Page History
...
The Jira REST API is only used in case you want to perform operations on Jira data, such as standard CRUD operations (Create, Read, Update, Delete) on issues or, for example, search for issues using JQL. Jira Cloud and Jira server/DC have similar (not equal) REST APIs.
APis available in Xray Cloud context
Xray Cloud provides a REST API and also a, more advanced, GraphQL API.
...
API provided by | type of API | versions | URL syntax | authentication | purpose | notes | |
---|---|---|---|---|---|---|---|
1 | Xray | REST API | v1, v2 | https://xray.cloud.getxray.app/api/v1/<resource_name> https://xray.cloud.getxray.app/api/v2/<resource_name> |
|
| This is the most used API, as it used for importing test automation results. |
2 | Xray | GraphQL | v2 | https://xray.cloud.getxray.app/api/v2/graphql |
Note: to make GraphQL requests, an initial REST API call needs to be made to the authentication endpoint |
| This API cannot be used to import test automation results. This API is more advanced and usually only required whenever implementing some custom scenarios. |
3 | Jira | REST API | v3 | https://<site_url>/rest/api/3/<resource_name> Note: <site_url> can be something like <xxx>.atlassian.net or it can be your own domain, in case you have it defined for your Jira cloud instance. |
|
| This API does not provide ways of accessing/modifying internal Xray data, such as test steps, for example. |
APis available in Xray server/DC context
Xray server/DC only provides a REST API, used to import test automation results and also to obtain and manage relations between Xray entities.
...
On the failed test, we leave a comment on the Test Run and also attached a screenshot as evidence.
Xray server/DC
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
curl -H "Content-Type: application/json" -X POST -u jira_username:jira_password --data @payload.json https://jiraserver.example.com/rest/raven/2.0/import/execution |
...
After importing results, a Test Execution would be created containing the results for the two tests; the details of the execution screen show the data of the Test Run, including its status, comment, timings, among other.
Xray Cloud
The first thing to do would be to obtain a token, using the Client Id and Client secret from the corresponding API key on Xray.
...