jira cloud api for fetching pull request details of the issue
Asked by Surendra Pattebahadur:

I am looking for the jira cloud api which should fetch the jira issue development panel information , i want to fetch the pull request details like pr id , url which are linked/associated with my jira issue. I have found that rest/dev-status api [https://NAME.atlassian.net/rest/dev-status/latest/issue/detail?issueId=10195\&applicationType=GitHub\&dataType=pullRequest](https://NAME.atlassian.net/rest/dev-status/latest/issue/detail?issueId=10195&applicationType=GitHub&dataType=pullRequest) but there is no official documentation for this . This is an private api which return development information herefore, they are not part of the official Jira Software REST APIs, they are not supported and they can change without any notice. I have inspected the jira UI deveopment panel i have found that here they are using grapgql for getting the pull request data does any api is exist for fetching the pull request details of issue using graphql or other jira cloud api for prs details


Answers:
author: Jehan Bhathena
body: Hi [@Surendra Pattebahadur](/t5/user/viewprofilepage/user-id/5536089)

In this explorer <https://developer.atlassian.com/platform/atlassian-graphql-api/graphql/explorer/> try searching for 'developmentInformation', this might be the api you're looking for.

comments: author: Surendra Pattebahadur
body: [@Jehan Bhathena](/t5/user/viewprofilepage/user-id/5119409) Actually i looking for the api to get the jira issue pull request.  
have the jira issue id by using the i want to fetch the associated pull request of this issue.  


author: Jehan Bhathena
body: Hi [@Surendra Pattebahadur](/t5/user/viewprofilepage/user-id/5536089)

Check this <https://developer.atlassian.com/cloud/jira/software/rest/api-group-development-information/#api-group-development-information>

Let us know if this is what you're looking for


author: Surendra Pattebahadur
body: [@Jehan Bhathena](/t5/user/viewprofilepage/user-id/5119409) I have tried this url <https://NAME.atlassian.net>/rest/devinfo/0.10/repository/\<repoId\>  
but it gives he 403 issue. looks like this api will give all pull request from from repository.  
my requirement like getting the specific jira issue pull request.

Do we have any jira cloud api for getting prs of issue.  
hope you got my requirement.  


author: Jehan Bhathena
body: Would highly recommend using the Graphql api then.

RestAPI is meant to fulfill a lot but Graphql seems to be the way ahead, and if the REST API documentation doesn't have anything for you yet, not sure if Atlassian might have it in it's radar.


author: Surendra Pattebahadur
body: [@Jehan Bhathena](/t5/user/viewprofilepage/user-id/5119409) i have searched a lot regarding for graphql api, if you know the grapghql api which will meet my requirement please suggest.  


author: Jehan Bhathena
body: Hey [@Surendra Pattebahadur](/t5/user/viewprofilepage/user-id/5536089)

As mentioned in my first answer, the query "developmentInformation" Is mostly the one you're looking for.

You can try this in Postman, it gives a nice UI for graphql queries and usage


Tags: cloud

graphql

jira-cloud