Jira Devinfo api

Yadhu S
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 7, 2024


Using my api key and basic authentication I made this API call from POSTMAN and I get the following error:

Endpoint: api.atlassian.com/jira/devinfo/0.1/cloud/7be41081-3d70-4ef0-9a6d-87ba6425cc85/repository/697138717

“code”: 401,
“message”: “Unauthorized”

I am an admin on my Jira…

Then I tried to call the same API with a bearer (OAuth) token and I get the following error:
“errorMessages”: [
“message”: “The request failed: Provider ‘OAuthClientId(value=YbxDeSvs8LGdfFWqTyoqvpy1kNTlELIU)’ not installed in any installation context ‘[ari:cloud:jira::global/, ari:cloud:platform::card/, ari:cloud:jira::site/7be41081-3d70-4ef0-9a6d-87ba6425cc85, ari:cloud:graph::workspace/af5d7e37-75b8-4c24-a96e-8a861d68dd16]’ for type ‘DEVELOPMENT_INFO’”

My app’s Oauth scope is this:
read:jira-user read:jira-work write:jira-work read:project:jira offline_access read:jql:jira read:issue-details:jira read:board-scope:jira-software read:sprint:jira-software write:sprint:jira-software manage:jira-data-provider read:dev-info:jira

I think the scopes are correct…

and this is happening for all the dev apis…

WHich raises the question:

  1. Dont api tokens work with devinfo apis? Will only oauth work?
  2. Even with oauth why do i get this error? whats wrong here?

My idea is to get the environment to which I am doing a particular deployment and thats not something I am getting via either /rest/dev-status/latest/issue/details?issueId=17783 or /rest/dev-status/latest/issue/summary?issueId=17783

I am getting it via this call but I am not sure whether I can go ahead and use it… can you please confirm?

curl --location ‘cubyts.atlassian.net/jsw/graphql?operation=DevDetailsDialog
–header ‘Content-Type: application/json’
–header ‘Authorization: Basic ’
–data ‘{
“operationName”: “DevDetailsDialog”,
“query”: “\n query DevDetailsDialog ($issueId: ID!) {\n developmentInformation(issueId: $issueId){\n \n details {\n instanceTypes {\n id\n name\n type\n typeName\n isSingleInstance\n baseUrl\n devStatusErrorMessages\n repository {\n name\n avatarUrl\n description\n url\n parent {\n name\n url\n }\n branches {\n name\n url\n createReviewUrl\n createPullRequestUrl\n lastCommit {\n url\n displayId\n timestamp\n }\n pullRequests {\n name\n url\n status\n lastUpdate\n }\n reviews {\n state\n url\n id\n }\n }\n commits{\n id\n displayId\n url\n createReviewUrl\n timestamp\n isMerge\n message\n author {\n name\n avatarUrl\n }\n files{\n linesAdded\n linesRemoved\n changeType\n url\n path\n }\n reviews{\n id\n url\n state\n }\n }\n pullRequests {\n id\n url\n name\n branchName\n branchUrl\n lastUpdate\n status\n author {\n name\n avatarUrl\n }\n reviewers{\n name\n avatarUrl\n isApproved\n }\n }\n }\n danglingPullRequests {\n id\n url\n name\n branchName\n branchUrl\n lastUpdate\n status\n author {\n name\n avatarUrl\n }\n reviewers{\n name\n avatarUrl\n isApproved\n }\n }\n buildProviders {\n id\n name\n url\n description\n avatarUrl\n builds {\n id\n buildNumber\n name\n description\n url\n state\n testSummary {\n totalNumber\n numberPassed\n numberFailed\n numberSkipped\n }\n lastUpdated\n references {\n name\n uri\n }\n }\n }\n }\n deploymentProviders {\n id\n name\n homeUrl\n logoUrl\n deployments {\n displayName\n url\n state\n lastUpdated\n pipelineId\n pipelineDisplayName\n pipelineUrl\n environment {\n id\n type\n displayName\n }\n }\n }\n featureFlagProviders {\n id\n createFlagTemplateUrl\n linkFlagTemplateUrl\n featureFlags {\n id\n key\n displayName\n providerId\n details{\n url\n lastUpdated\n environment{\n name\n type\n }\n status{\n enabled\n defaultValue\n rollout{\n percentage\n text\n rules\n }\n }\n }\n }\n}\n remoteLinksByType {\n providers {\n id\n name\n homeUrl\n logoUrl\n documentationUrl\n actions {\n id\n label {\n value\n }\n templateUrl\n }\n }\n types {\n type\n remoteLinks {\n id\n providerId\n displayName\n url\n type\n description\n status {\n appearance\n label\n }\n actionIds\n attributeMap {\n key\n value\n }\n }\n }\n }\n \n embeddedMarketplace {\n shouldDisplayForBuilds,\n shouldDisplayForDeployments,\n shouldDisplayForFeatureFlags\n }\n\n }\n\n }\n }”,
“variables”: {
“issueId”: “17783”

I am perfectly happy If i get the environment to which the deployment has been done…

0 answers

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events