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?
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.