Alternate of rest/api/1.0/render

As per the Jira Software 10.0.x upgrade notes | Atlassian Support | Atlassian Documentation, it’s mentioned in Changes to REST API that rest/api/1.0 endpoint is removed, but we are using the rest/api/1.0/render API for our plugin and is an integral part, so we tried rest/api/2.0/render, but it doesn’t give the required response. So, can you suggest an API to use for this that is compatible with Restv2 and Jira 10 or can we use the same API i.e rest/api/1.0/render

Hi @YashChandarana,

You are right. there isn’t a direct replacement for the rest/api/1.0/render endpoint in REST API v2. However, you can consider using the Jira REST API v2 to achieve similar functionality by customizing your plugin to handle rendering differently.

Here’s a general approach you can take:

  1. Retrieve the Content: Use the REST API to fetch the content you need to render.
  2. Custom Rendering: Implement custom rendering logic in your plugin to process and display the content as required.

Fetching Content with REST API v2

This worked within my plugin:

import com.atlassian.jira.rest.api.JiraRestApi;
import com.atlassian.jira.rest.api.auth.AuthenticationHandler;
import com.atlassian.jira.rest.api.auth.BasicAuthenticationHandler;
import com.atlassian.jira.rest.api.issue.IssueRestClient;
import com.atlassian.jira.rest.api.issue.IssueSearcher;
import com.atlassian.jira.rest.api.issue.IssueSearcherBuilder;
import com.atlassian.jira.rest.api.issue.Issue;


AuthenticationHandler authHandler = new BasicAuthenticationHandler("username", "password");
JiraRestApi restApi = JiraRestApi.create(authHandler);
IssueRestClient issueClient = restApi.getIssueRestClient();
 IssueSearcher searcher = IssueSearcherBuilder.builder(restApi).build();

// Fetching an issue by key
Issue issue = issueClient.getIssue("JIRA-1234");
System.out.println("Issue Content: " + issue.getField("description").getValue());

Custom Rendering Logic

You’ll need to implement custom rendering logic in your plugin to process and display the content fetched from the API. This might involve parsing the content and applying any necessary transformations.

Maybe it will help. :slight_smile:

Cheers,
Daniel