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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

getting XRAY steps with API

i would like to get the steps done in an xray issue,   so later on i can modify them i am following the documentation from https://docs.getxray.app/display/XRAY/Test+Steps+-+REST

 and using 

https://my_site/rest/raven/1.0/api/test/TES-3/step  but my responds is 404  

i created an API TOKEN that i can use in the normal Jira api calls, for example if i do 

https://my_site/rest/api/2/issue/TES-3 and do get a json with information, but looks like in the directory doesn't have the information of the steps, or the other precondition, test sets etc...  so i went to look for the xray API, but they say that is also basic that i can use jira API, .... i am missing something? xray does have a different authorization?  i am using the free version not sure if that might have restrictions?  

 

thanks guys =?

1 answer

Hi @Demiank100 ,

it seems you're looking at Xray Server (on Jira server) documentation. 

The proper documentation for Xray Cloud is this one: https://docs.getxray.app/display/XRAYCLOUD/GraphQL+API

 

It requires you to use the GraphQL API, which is the correct API for that in cloud.

You can see some usage examples in the postman collections available in this open-source project :)  - https://github.com/Xray-App/xray-postman-collections

Regards

Sergio

thanks Sergio,  i was able to create my API on the xray application(not Jira, that is a diferent thing and maybe that what i was having confuse to begging with), and did a rest api to 

https://xray.cloud.xpand-it.com/api/v1/authenticate

with my cliend_id and my client_secret, got 200 and got the token =)

 

but now? what do i do?  how can i retrieve for example the steps on an issue? or update them?

I would highly recommend you to have a look at the postman collections that I've shared with you as it provides concrete examples :)

Here is an example of a GraphQL request for that:

 

HTTP GET request to https://xray.cloud.xpand-it.com/api/v1/graphql with the body content

{ getTest(issueId: "1234") { steps { id data action result attachments { id filename } } }}

 

you need to know the issueId (it's not the issue key) though. For that you need to either obtain it from the Jira HTTP issue creation request.. or you need to make a Jira HTTP request for that. For the former, I've an example in the postman collection under GraphQL>tests>create folder. For the later, you can see here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get

Note: the GraphQL documentation is somehow interactive; it also provides usage examples.

thanks for posting the git https://github.com/Xray-App/xray-postman-collections  with those examples, they are great  (and easier to follow that the xray documentation =)  thanks,  got it working.

you're welcome :) it took me a while to prepare them but I think they help in cases like this ;)

Sérgio

they SUPER HELP!!!!

Like Sergio Freire likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

265 views 2 5
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