Create Jira Change Log Report via REST API

Angelo Loria June 11, 2019

Is it possible to create a Jira Change Log report via the API? I see you can create content (https://developer.atlassian.com/cloud/confluence/rest/#api-content-post) but am not sure how I would fill out the body to create a report. I have a tool that creates the Fix Versions/Releases in Jira every sprint, but currently am manually generating the report and would like to automate that step.

1 answer

1 accepted

0 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2019

Hello Angelo,

You could, in theory, create a change log report via the REST API, but it may not be a mirror image of one created from the template. The reason for this would be the page you create via the REST API will need static values or additional values added from Jira itself. If you did want to attempt this I would approach it with the following logic;

  1. Create or locate a Jira Change Log Report page within Confluence.
  2. Call the following endpoint against said, page to get the storage format:
    1. GET /wiki/rest/api/content
  3. Locate the variables you wish to change within the storage format and replace them
    1. This is where you may need to call Jira REST API endpoints to get further data
  4. Create a new page with your changelog report values replaced using the following endpoint:
    1. POST /wiki/rest/api/content

With this method, you could create a script to complete the steps to assist with creating a Jira Change log report via the REST API. I hope these steps and references prove helpful for creating your content.

Regards,
Stephen Sifers

Angelo Loria June 13, 2019

Hi Stephen,

That is what I ended up doing. Was a nightmare formatting the storage content into the JSON payload, but it is working. Thank you.

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events