Page History
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -H "Accept: application/json" -u jira_username:jira_password https://jiraserver.example.com/rest/raven/1.0/api/test/CALC-1880/step |
Jira 8.14 introduced the concept of Personal Access Tokens, which Xray takes advantage of. These tokens can be created in the user's profile section in Jira and have an expiration date; they can also be revoked at any moment (more information here).
To use them in Jira's and in Xray REST API calls, we need to use the HTTP header "Authorization" with the "Bearer <token>" value.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -H "Accept: application/json" -H "Authorization: Bearer MDkzNjIyMTEwNjQzOqb+ApTGm3af+z3eGdcyDm7xHv6R" https://jiraserver.example.com/rest/raven/1.0/api/test/CALC-1880/step |
Version and URI
The Xray REST API has 2 versions: v1.0 and v2.0. New versions of the API are created whenever there are breaking changes that can have a big impact on current integrations.
The URIs for resources have the following structure:
https://<site-url>/rest/raven/<api-version>/api/<resource-name>
For example, http://yourserver/rest/raven/2.0/api/test/TEST-123/step
Note that the latest version of the Xray REST API is version 2.0. All endpoints from version 1.0 are available in version 2.0 unless they have been deprecated and removed intentionally.
...