Forums

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

Querying Xray Graphql for a Test Execution in Jira automation returns null

Gary Long July 15, 2025

I tried to follow the tutorial available on xray documentation to use Jira automation to get the results of a test execution but the result of the web request is always null.

I've got a first web request for the authentication which returns a token, and a second web request which query the graphql db to get a specific test execution. I use the token returned by the first web request for the Bearer header of the second request.

The second request returns a 200 status but the content of its body is {data={getTestExecution=null}}.

The following image is the content of my jira automation

Capture d'écran 2025-07-15 173222.png

the next screenshot is the content of the second webrequest:

Capture d'écran 2025-07-15 174529.png

 

Best regards,

Gary

2 answers

1 accepted

0 votes
Answer accepted
Gary Long July 16, 2025

The issue was with the Xray API key used and not the content of the automation or the graphql query.

0 votes
John Funk
Community Champion
July 15, 2025

Hi Gary,

Can you share the results of the Audit Log?

Gary Long July 16, 2025

Hi John,

I've found the cause of the issue. I was using a new Xray API key for the jira user "Automation for Jira" and even though a token was correctly created by the call to the authentication endpoint, the next call to the graphql endpoint always returned empty results, whatever the query was.

I've used a different Xray API key generated for a real user of our organization and now it works correctly. I don't know exactly why it does not work for the automation for Jira user but that's not a big deal.

Thank you for answering !

Regards,

Gary

Like John Funk likes this
John Funk
Community Champion
July 16, 2025

Great! Glad you found the problem and thanks for updating the post!

Suggest an answer

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

Atlassian Community Events