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,363,485
Community Members
 
Community Events
168
Community Groups

JIRA XRAY - problems authenticating

Hello,

 

I'm trying to import an xml report to Jira xRay - to a Test Execution item.

The documentation I can find makes reference to client_id and client_secret, which should be generated by Create API key. Create API key only generates one string, a token.

As such I can't figure out how to use just the token to submit the xml report.

For example, this command:

curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.getxray.app/api/v2/authenticate

I can't use it, as it needs client_id and client_secret. Also, the endpoint itself returns 

Cannot GET /api/v2/authenticate

 

Using this command:

curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token"  --data @"data.xml" https://xray.cloud.getxray.app/api/v1/import/execution/junit?testExecKey=XNP-23

from: https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST#ImportExecutionResultsREST-JUnitXMLresults

results in "{"error":"Invalid JWT: JsonWebTokenError: jwt malformed"}"

 

Please can anyone help?

1 answer

Hi @Adam Grzegorzewski 

This only happens when the token is not correctly stored/sent in the request.

Ensure that the token is exactly as returned by the authentication API, without linefeeds or any other character that does not exist in the returned token.

If you need further help, please contact Xray Support (http://Xraysupport.getXray.app) to help further.

Thank you.

Kind regards,
Rogerio Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events