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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I get JWT error thro Xray Cloud end point

I try to import the results from cypress to my Jira board but I get an authentication error.

I already created the token on Jira but this is the error: 

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

This is the input:

curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token" --data @"results/test-results.xml" https://xray.cloud.xpand-it.com/api/v1/import/execution/junit?projectKey=QA

Before this I authenticate in Xpand it

curl -H "Content-Type: application/json" -X POST --data '{ "client_id": "","client_secret": "" }' https://xray.cloud.xpand-it.com/api/v1/authenticate

Do I have to do some additional on Jira?

3 answers

Hi Ginett,

I haven't really dabbled around with Xray API, but I found this article that I think may be helpful to you.

From the document, I can that you can use the query below to import the report to Xray using the API query below: 

curl -H "Content-Type: multipart/form-data" -u emailaddress:apitoken -F "file=@results/test-results.xml" http://jiraURL/rest/raven/1.0/import/execution/junit?projectKey=CALC

 With that said, you can confirm the correct API query from the Xray support team using the link below:

Regards,

Hilda

Hi,

As you can see Xray documentation is divided between Server/DC and Cloud, and some methods/arguments may differ depending on which one you are using (https://docs.getxray.app/site/xray).

 

Assuming you are using the correct one, please make sure the token returned is used without the quotation marks (") and without any strange character in it.

Hi @Ginett Rosales 

Yes, as @cristiano.cunha said, that is usually an issue with the token. Like not being correctly stored by API client tool or something similar.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

507 views 2 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you