Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get commit information from custom field

Dmitry Vakarin February 25, 2021

Hi, I have needed information about commit in the custom field ("Development").

When I try retrieve information via:

/rest/dev-status/1.0/issue/detail?issueId={issueId}&applicationType=stash&dataType=repository

I've got:

{
"detail": [],
"errors": []
}

 

When I try retrieve information from fields I've got:

{repository={count=1, dataType=repository}, json={"cachedValue":{"errors":[],"summary":{"repository":{"overall":{"count":1,"lastUpdated":"date","dataType":"repository"},"byInstanceType":{"GitHub":{"count":1,"name":"GitHub"}}}}},"isStale":true}}

 

I need the URL of the commit and file information. How can I get this information?

3 answers

1 accepted

1 vote
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 2, 2021

Hello @Dmitry Vakarin ,

Welcome to the Atlassian Community!

If I understand correctly you are trying to get development information via REST API. 

Now, if this is correct, I can see that you are already on the right way but in your REST API call you are saying you want to get the repository information for Stash while it looks like you are actually using GitHub and therefore you get an empty response.

Can you try to modify your REST API call as below and let me know if it works:

https://[NAME].atlassian.net/rest/dev-status/latest/issue/detail?issueId=[ISSUE-ID]&applicationType=GitHub&dataType=repository

 

 

Please notice those are not officially supported endpoints. However, for all the details about these endpoints and how they work (including examples), you might want to review the description of the below feature request:

 

In short (but please review above Feature request for more details and examples):

  1. You can use the internal endpoint /rest/dev-status/latest/issue/summary?issueId=<ISSUE_ID> (replace <ISSUE_ID> with the actual ID of the Jira issue you want to GET the information from) to get the information displayed in the development panel of an issue. 
  2. You can use the information returned by above call to correctly populate the parameters for the endpoint: /rest/dev-status/latest/issue/detail?issueId=10195&applicationType=<APPLICATION-TYPE>&dataType=<DATA_TYPE>

 

Finally, you may want to vote and watch the above feature request so that you will get notified in case of any update. The  feature will be addressed according to the Implementation of New Features Policy.

 

 

Cheers,
Dario

Dmitry Vakarin March 5, 2021

Thank you so much! It's exactly what I needed.

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2021

You are very welcome @Dmitry Vakarin ! I am happy to know this helped.

Have a nice weekend!

 

Dario

Like Dmitry Vakarin likes this
0 votes
Deleted user February 14, 2022

Is there a way to get more than one dataType in one request? Something like dataType=repository,branch?

0 votes
Dmitry Vakarin February 25, 2021

[del]

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events