Get state changelog of Features & Epics from REST API
Asked by Bram Langelaar:

Hi all! :-)

I am looking for the state changes of Jira Align Features \& Epics. However, I haven't found it in the REST API yet.

Little bit more context:

We would like to measure the time between state changes for reporting purposes.

Feature (left) and Epic (right) states:

![Capture.PNG](/t5/image/serverpage/image-id/120135i89A47453090D7ADB/image-dimensions/145x238?v=v2 "Capture.PNG")![Capture2.PNG](/t5/image/serverpage/image-id/120136i0FC244D4C5301241/image-dimensions/137x138?v=v2 "Capture2.PNG")

Is there some sort of parameter which can be included in the GET call? Like "/rest/align/api/2/Features?expand=changelog"? We've done the same with the JIRA API. In JIRA we've used the '?expand=changelog' parameter.

Thank you in advance! :-)

Kind regards,

Bram


Answers:
author: Rodrigo Cortez
body: Hi Bram,

State changes in Jira Align are displayed in work items' *Audit Log*. The image below shows the state change.

![Screen Shot 2020-12-01 at 09.30.09.png](https://community.atlassian.com/t5/image/serverpage/image-id/120183iBCFF5E48B49E1026/image-size/large?v=v2&px=999 "Screen Shot 2020-12-01 at 09.30.09.png")

The Jira Align API 2.0 has endpoints for retrieving audit logs. They are:

* Features: **GET /align/api/2/Features/{id}/auditlog**
* Epics: **GET /align?/api?/2?/Epics?/{id}?/auditlog**

Find below an excerpt of the GET response body, for the Feature depicted in the image above:

```
 (...)
 {    "id": 53440,    "reqId": "Req8614",    "userId": "661683",    "auditActivityId": 2,    "auditTimeStamp": "2020-12-01T07:28:07Z",    "details": "Feature (Jira Epic) Updated - <li><font class=\"fields\">Status Changed</font> - From [<font  class=\"values\">1 - Ready To Start</font>] To [<font  class=\"values\">2 - In Progress</font>]</li>",    "auditType": "Feature",    "realUserUid": null,    "wmsconnectorId": null,    "updatedBySystem": null  }
(...)
```

Check *Swagger* on your instance, for details. Accessible via:

* <https://instance.jiraalign.com/rest/align/api/docs/index.html>


author: Mark Cruth
body: [@Bram Langelaar](/t5/user/viewprofilepage/user-id/4148886) - thanks for reaching out! The closest we have to pulling out state changes with time stamps would be to have the API pull the audit log for a particular Feature or Epic using the following:

* /rest/align/api/2/Features/{Feature ID}/auditlog
* /rest/align/api/2/Epics/{Epic ID}/auditlog

Each audit log entry will appear so there isn't a nice return format for what you're looking for (you'll need to write some code to splice this and grab the bits you want). Here's an example of what a state change entry might look like as a return...

![Screen Shot 2020-12-01 at 7.28.59 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/120184iFAE08CA5DD37A9D7/image-size/large?v=v2&px=999 "Screen Shot 2020-12-01 at 7.28.59 AM.png")

I'd say this is a great enhancement request, so I would recommend submitting an idea for this at <http://ideas.jiraaalign.com> (you'll need to create a free account).

If this sort of reporting is import for your organization, you may also be interested in our Enterprise Insights tool, which is our BI solution for Jira Align. The product would give you access to a curated DB that contains live data, like change history which you can pull into your own reporting tools. Here's a link to learn more: <https://www.atlassian.com/software/jira/align/bi>

Hope this helps!

Mark


author: Bram Langelaar
body: Both [@Rodrigo Cortez](/t5/user/viewprofilepage/user-id/3219679) \& [@Mark Cruth](/t5/user/viewprofilepage/user-id/3648064) thank you! Good to know it's there. I already looked at the auditlog endpoint, however did not expect the state changes to be in there due to the formatting. :-)

[@Mark Cruth](/t5/user/viewprofilepage/user-id/3648064) , you mentioned the possibility to publish ideas via ideas.jiraalign.com. I've registered myself for an account. Do you know who the administrator is who can approve my access request?

![Capture3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/120197i8760F3D3F82A2A80/image-dimensions/576x173?v=v2 "Capture3.PNG")

comments: author: Mark Cruth
body: [@Bram Langelaar](/t5/user/viewprofilepage/user-id/4148886) - the Jira Align Product Management Team handles access. I've sent them a note to get your account approved, so you should hopefully get a response soon :-)


author: Bram Langelaar
body: Hi [@Mark Cruth](/t5/user/viewprofilepage/user-id/3648064) - I am trying to login into the ideas page, however the page keeps caching. Just to make sure, is my account activated? I've registered myself with my work email address.


author: Mark Cruth
body: [@Bram Langelaar](/t5/user/viewprofilepage/user-id/4148886) - I'd recommend you attempt accessing the page using incognito mode in Chrome to see if that avoids the caching issue. Unfortunately I don't have visibility to your access ( [@Rodrigo Cortez](/t5/user/viewprofilepage/user-id/3219679) might be able to check), but I believe your account was setup and approved back in December.


author: Rodrigo Cortez
body: Hi [@Bram Langelaar](/t5/user/viewprofilepage/user-id/4148886)

I can see two Ideation user requests which seems that belong to you -- one from a Gmail account and another one from a corporate account.

The later is enable (meaning you should be able to log in by using it) while Gmail is disable. We don't typically allow non-corporate accounts to log in to the *Ideation* portal. Please let me know how it goes.

If still you have issues, feel free to [raise a Support case](https://support.atlassian.com/) to the Jira Align queue and I'll grab it.


Tags: cloud