You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.