0

I am fetching test and their status attached to test execution using API. Below is the command for same:

curl -u username:password -X GET -H "Content-Type:application/json" --url ""https://server/rest/api/2/testexec/TEST-1161""

I am facing below error while fetching the same:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>404</status-code><message>null for uri: https://server/rest/api/2/testexec/TEST-1161</message></status>

Where I am getting wrong ?? Also When I am using the same url for updating status of TEST, I am able to do so.

1 Answers1

0

On your request you are missing the last '/test' that is originating the 404 error.

Add it to the end of your URL, for example: curl -u username:password -X GET -H "Content-Type:application/json" --url ""https://server/rest/api/2/testexec/TEST-1161/test""

You have documentation available here regarding how to get Test Execution details from Xray: https://docs.getxray.app/display/XRAY/Test+Executions+-+REST.

Cristiano Cunha
  • 381
  • 1
  • 3
  • Hey. Thanks for replying. I trying with your suggested way. But I am still getting this error. – Oshin aggrawal Aug 05 '22 at 13:01
  • The URL is the last parameter received and do not need the "--url" or the double quotes. My suggestion is to remove the --url and the double quotes.Make sure that the endpoint you are replacing "server" in the URL is available and reachable and that the Test key exists in your Jira project. – Cristiano Cunha Aug 08 '22 at 09:37