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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,462,577
Community Members
 
Community Events
176
Community Groups

Getting each time a 404 with Xray API's

Hi Team,

I am using Xray plug- in with JIRA (Both cloud version) and I want to automate the test status of JIRA stories automate with the help of API's.

I am able to create/delete Jira issues with Jira API's

But am facing 404 each time I am trying to access Xray API's.

Below are some examples:

JIRA API: Working.

curl -H "Content-Type: application/json" -X GET -u Username:API_Token http://testing.atlassian.net/rest/api/2/issue/TEST-123/editmeta

Response: 200 Success

Message: JSON (As expected)

Xray API: Not working.

curl -H "Content-Type: application/json" -X GET -u Username:API_Token http://testing.atlassian.net/rest/raven/1.0/api/test?keys=TEST-123

Response: 404 Not Found

<status-code>404</status-code>

<message>null for uri: http://testing.atlassian.net/rest/raven/1.0/api/test <message>

 

Note: URL for both is "http://testing.atlassian.net/..............."  and same authentication "Username:API_Token" I am using for JIRA and Xray API's.

I am not sure what I am missing because all of the JIRA API's are working but none of the Xray API is working.

 

Any help is appreciated.

 

3 answers

1 accepted

0 votes
Answer accepted

Hi @Deepak Sharma ,

I think there is some confusion.

First, you are referring to different APIs.

 

  • The following API request belongs to Jira REST API (it's not a Xray API endpoint):

http://testing.atlassian.net/rest/api/2/issue/TEST-123/editmeta

 

  • This API request is not correct at all (neither the URL, nor the request):

http://testing.atlassian.net/rest/raven/1.0/api/test?keys=TEST-123

 

If you're using Xray Cloud, as it seems, then the endpoint always starts with something like this: https://xray.cloud.xpand-it.com.

Xray Cloud provides two different APIs: one REST API (mostly for importing test automation results) and one GraphQL based (which provides a lot more operations).

You can find more about these two APIs at: https://docs.getxray.app/display/XRAYCLOUD/API

 

Note: if you aim to export cucumber tests (i.e. generate .feature files based on Cucumber Tests defined in Jira), you will need to use this endpoint:

https://docs.getxray.app/display/XRAYCLOUD/Exporting+Cucumber+Tests+-+REST+v2

You need to have a token first, which requires you to call the authentication where you provide the client_id and client_secret of an API key created in Xray settings:

endpoint: https://docs.getxray.app/display/XRAYCLOUD/Authentication+-+REST+v2

 

 

Regards

Sergio

Trying https://myserver.atlassian.net/rest/raven/2.0/api/test/TEST-500/steps in postman getting 

 

<status>
    <status-code>404</status-code>
</status>
Why cant i access xray api?

Hi @Sergio Freire - Xblend 

I am trying to get test case for test execution via this endpoint 

https://<company_name>.atlassian.net/rest/raven/2.0/api/testexec/XR-2176/test 

 

However, it throws 

null for uri: https://<company_name>.atlassian.net/rest/raven/2.0/api/testexec/XR-2176/test

 

When I try

 https://xray.cloud.xpand-it.com/rest/raven/2.0/api/testexec/XR-2176/test

 it throws

 Cannot GET /rest/raven/2.0/api/testexec/XR-2176/test<

 

Hi @Piyush Nimoria 

Those REST API only work on Xray Data Cente/Server, they don't work in Xray Cloud, since in practical terms are two different products.

In Xray Cloud you need to use GraphQL API: https://docs.getxray.app/display/XRAYCLOUD/GraphQL+API

Thank you.

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

Hi, Im also having the same issue 

making a  GET to https://<my company>.atlassian.net/rest/raven/2.0/api/test/<my ticket>/step

Using Basic Auth: email and api token as password

and im getting:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
<status-code>404</status-code>
<message>null for uri: https://<my company>.atlassian.net/rest/raven/2.0/api/test/<my ticket>/step</message>
</status>

Any resolutions for this issue above? ^^

that URL (e.g. /rest/raven/2.0/api/test/<my ticket>/step)  is from Xray for Jira datacenter... not for Xray on Jira cloud.

On Xray cloud, to obtain informations on test entities you need to use the GraphQL API instead. You can see the available APIS in the Xray  cloud documentation.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events