Page History
Table of Contents |
---|
Overview
If you aim to interact with Xray data, there are a bunch of APIs you can use for different purpose.
But first you need to answer:
...
- Am I using Xray on Jira server/
...
- datacenter or Xray on Jira Cloud?
...
- REST API
- v1 vs v2
- GraphQL
...
- Jira server/datacenter
- basic authentication (username + password)
- Personal Access tokens
- Jira Cloud
- API keys (i.e. Client Id + Client Secret pair)
Table of Contents |
---|
Overview
If you aim to interact with Xray data, there are a bunch of APIs you can use for different purpose.
But first you need to answer:
- Am I using Xray on Jira server/datacenter or Xray on Jira Cloud? This is crucial as these are different products, using different technologies, providing slightly different APIs.
- What do I aim to do? This is important to select the proper API to invoke; the format of the API call may be different even if there is a similar API endpoint for the other deployment type.
- Which authentication mechanism do I want to use on the API calls? This is mostly dependent on the previous answers.2
This page will help you out answer these questions.
Xray server/DC vs Xray Cloud
Although similar, Xray for Jira server/Data Center(DC) and Xray for Jira Cloud are different products, essentially because they are built on top of different infrastructures and application capabilities. Jira server/datacenter and Jira Cloud are distinct products, with different roadmaps, built using distinct technologies, and providing different APIs. This has a consequence that apps for Jira server/DC and for Jira Cloud are essentially totally different from an architecture standpoint, but eventually also from a feature perspective.
Jira server/DC provides certain customizations capabilities, which may not be available on Jira Cloud.
From an integration standpoint, there will always be changes if a 3rd party wishes to integrate with both Xray server/DC and Xray Cloud. However, these can be subtle, depending on the flow to be implemented.
Info | ||
---|---|---|
| ||
?? |
Available APIs
Xray Cloud
...
- basic authentication, OAuth 2.0
...
- standard CRUD operations on Jira entities, including Jira issues (which includes Xray issue based entities)
...
- API key (i.e., pair of Client Id + Client Secret created by Jira administrator)
...
- authentication
- importing test results
- importing tests
- import/exporting Cucumber scenarios
- backups
...
- API key (i.e., pair of Client Id + Client Secret created by Jira administrator)
Note: to make GraphQL requests, an initial REST API call needs to be made to the authentication endpoint
- This is crucial as these are different products, using different technologies, providing slightly different APIs.
- What do I aim to do? This is important to select the proper API to invoke; the format of the API call may be different even if there is a similar API endpoint for the other deployment type.
- Which authentication mechanism do I want to use on the API calls? This is mostly dependent on the previous answers.2
This page will help you out answer these questions.
Xray server/DC vs Xray Cloud
Although similar, Xray for Jira server/Data Center(DC) and Xray for Jira Cloud are different products, essentially because they are built on top of different infrastructures and application capabilities. Jira server/datacenter and Jira Cloud are distinct products, with different roadmaps, built using distinct technologies, and providing different APIs. This has a consequence that apps for Jira server/DC and for Jira Cloud are essentially totally different from an architecture standpoint, but eventually also from a feature perspective.
Jira server/DC provides certain customizations capabilities, which may not be available on Jira Cloud.
From an integration standpoint, there will always be changes if a 3rd party wishes to integrate with both Xray server/DC and Xray Cloud. However, these can be subtle, depending on the flow to be implemented.
Info | ||
---|---|---|
| ||
?? |
Available APIs
Xray Cloud
provided by | type of API | versions | authentication | purpose | notes | |
---|---|---|---|---|---|---|
1 | Jira | REST API | v3 |
|
| This API does not provide ways of accessing/modifying internal Xray data, such as test steps, for example. |
2 | Xray | REST API | v1, v2 |
|
| |
3 | Xray | GraphQL | v2 |
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. |
Xray server/DC
provided by | type of API | versions | authentication | purpose | notes | |
---|---|---|---|---|---|---|
1 | Jira | REST API | latest |
|
| This API does not provide ways of accessing/modifying internal Xray data, such as test steps, for example. |
2 | Xray | REST API | v1.0, v2.0 |
...
- CRUD operations for Xray entities, with access to all data, including creation of tests
- obtain Xray entities and other entities related to them, and manage these associations
- export test results
...
Xray server/DC
|
- standard CRUD operations on Jira entities, including Jira issues (which includes Xray issue based entities)
- Basic authentication
- Personal Access Tokens (since v8.14, for Jira DC only)
- OAuth 1.0a
- importing test results
- import/exporting Cucumber scenarios
|
Info | ||
---|---|---|
| ||
| ||
Info | ||
| ||
|
Info | ||
---|---|---|
| ||
Xray REST API v2.0 is an extension to the original v1.0 of the REST API. Therefore, all existing endpoints on v1.0 also exist on v2.0 (even if you don't see that in the docs); you just need to replace the "1.0" by "2.0" on the URL. Example: /rest/raven/1.0/api/test/{key}/testexecutions becomes /rest/raven/2.0/api/test/{key}/testexecutions |
Use cases
Importing test automation results to Xray
...