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 =?
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you're welcome :) it took me a while to prepare them but I think they help in cases like this ;)
Sérgio
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.