Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,016
Community Members
 
Community Events
184
Community Groups

Unable to query Jira GraphQL: Argument 'id' annotated with @ARI did not contain valid ARI

Hi

I'm trying to use the Jira GraphQL (https://developer.atlassian.com/platform/atlassian-graphql-api/graphql) but I'm failing to make a successful query with the GraphQL gateway (https://api.atlassian.com/graphql#).

To start, I'm just trying to query a Jira issue. By using the query explorer, I got the following query:

query MyQuery {
jira {
issue(id: "17923") {
key
}
}
}

17923 is the issue ID that I found in the `id` field of https://my-domain.atlassian.net/rest/api/3/issue/SOME-ISSUE-KEY-123

 

When I run the query, I get the following error message:

{
"errors": [
{
"message": "Argument 'id' annotated with @ARI did not contain valid ARI: 17923",
"locations": [],
"extensions": {
"classification": "InvalidARI",
"errorSource": "GRAPHQL_GATEWAY"
}
}
],
"data": {
"jira": null
},
"extensions": {
"gateway": {
"request_id": "9c24226e24cd37ec",
"crossRegion": false,
"edgeCrossRegion": false,
"deprecatedFieldsUsed": []
}
}
}

 

I also tried `issue(id: 17923)` (without quotes), then I get

Argument 'id' annotated with @ARI must be a StringValue but is a 'IntValue'

even though the documentation seems to indicate that the id can either be a string or an int.

Is the issue ID found through the REST API not what I need to put in there?

What am I doing wrong?

 

Thanks for your help!

1 answer

Good evening, here is another method that can meet your need

query hostNames {
     tenantContexts(hostNames:["my-domain.atlassian.net"]) {
      cloudId
      }
}
query issuekey{
    jira {
        issueByKey(cloudId:"XXXXX" , key: "DEM-14") {
        id
       }
     }
}

Use First response query for second query

And use : my-domain.atlassian.net/gateway/api/graphql#

 

Good night

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events