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

I am importing testng results xml file in xray jira using api, but getting error 503

Samadhan Sawant October 18, 2024

I am importing testng results xml file in xray jira using following api -->

 

curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer %API_TOKEN%" --data @"testng-results.xml" "https://xray.cloud.getxray.app/api/v2/import/execution/testng?projectKey=SCRUM&testExecKey=%TEST_EXECUTION_KEY%"

 

But getting this response -->

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<TITLE>ERROR: The request could not be satisfied</TITLE>

</HEAD><BODY>

<H1>503 ERROR</H1>

<H2>The request could not be satisfied.</H2>

<HR noshade size="1px">

The Lambda function associated with the CloudFront distribution is invalid or doesn't have the required permissions.

We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.

<BR clear="all">

If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

<BR clear="all">

<HR noshade size="1px">

<PRE>

Generated by cloudfront (CloudFront)

Request ID: IxByHTYTtgW-EKcgR42rAk-tJXmUnZPmA-BDKhxbAa-q7ZjkxFRC1w==

</PRE>

<ADDRESS>

</ADDRESS>

</BODY></HTML>

 

Is it a server isssue or issue with the API request?

3 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Manuel
Contributor
October 19, 2024

If you can import the results using the UI but not using the REST API call, then it can be something related with the API endpoint.

You should reach out Xray support team here as you're getting a 503 http error and that is totally unexpected.

One of 2 things could be happening:

  1. temporary issue in Xray infrastructure
  2. your Xray data can be stored in a specific region from your endpoint. You can try submitting that request to one of the specific data-residency endpoints detailed here like "https://eu.xray.cloud.getxray.app/" or "https://us.xray.cloud.getxray.app/ for example. If that still doesn't work out, reach out Xray support team

 

 

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2024

Hi @Samadhan Sawant 

Welcome to the community

It might be you are running in to this, see:

https://github.com/serverless-nextjs/serverless-next.js/issues/984 

I don't think it's Xray API related.

 

 

 

0 votes
Bert van Dijk _TMC_nl_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2024

Hi Samadhan,

 

Is general, it is always good to involve Xray support with questions.

Question, do yo have a specific data residency?

https://docs.getxray.app/display/XRAYCLOUD/Data+Residency

Did you include both a client id and a client secret?

 

https://docs.getxray.app/display/XRAYCLOUD/Global+Settings%3A+API+Keys

 

Kind regards,

Bert

Samadhan Sawant October 18, 2024

Hi Bert,

I don't have any data residency.

Also, I am using client secret as a token "API_TOKEN". It was working fine some months ago. Right now this error is occurring.

 

 

Bert van Dijk _TMC_nl_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2024

Hi Samadhan,

 

Api tokens can expire. Please check or try to use a new one. Else, please also involve Xray. Especially when you didn;t change anything and it suddenly doesn't work anymore.

As I can see, you are following the documentation:

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

https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST+v2

 

Is the XML valid?

 

Kind regards

Bert

Samadhan Sawant October 18, 2024

Hi Bert,

 

The xml file is valid, If I import it manually using JIRA UI, it gets imported successfully. I am getting error while importing it using API only.

Also API token is not expired. 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events