Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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:

...

  1. Am I using Xray on Jira server/

...

  1. 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:

  1. 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.
  2. 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.
  3. 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
titleAm I using Jira server/datacenter or Jira Cloud?

??

Available APIs

Xray Cloud 

...

managed by Jira Cloud

  • basic authentication, OAuth 2.0

...

  • standard CRUD operations on Jira entities, including Jira issues (which includes Xray issue based entities)

...

managed by Xray Cloud

  • 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

...

managed by Xray Cloud

  • 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

  1. This is crucial as these are different products, using different technologies, providing slightly different APIs.
  2. 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.
  3. 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
titleAm I using Jira server/datacenter or Jira Cloud?

??


Available APIs

Xray Cloud 


provided bytype of APIversionsauthenticationpurposenotes
1JiraREST APIv3

managed by Jira Cloud

  • basic authentication, OAuth 2.0
  • standard CRUD operations on Jira entities, including Jira issues (which includes Xray issue based entities)
This API does not provide ways of accessing/modifying internal Xray data, such as test steps, for example.
2XrayREST APIv1, v2

managed by Xray Cloud

  • 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

3XrayGraphQLv2

managed by Xray Cloud

  • 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

  • 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
This API cannot be used to import test automation results.

Xray server/DC



provided bytype of APIversionsauthenticationpurposenotes
1JiraREST APIlatest

managed by Jira server/DC

  • standard CRUD operations on Jira entities, including Jira issues (which includes Xray issue based entities)
This API does not provide ways of accessing/modifying internal Xray data, such as test steps, for example.
2XrayREST APIv1.0, v2.0

managed by Jira server/DC

...

  • 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

provided bytype of APIversionsauthenticationpurposenotes1JiraREST APIlatest

managed by Jira server/DC

  • Basic authentication
  • Personal Access Tokens
    • standard CRUD operations on Jira entities, including Jira issues (which includes Xray issue based entities)
    This API does not provide ways of accessing/modifying internal Xray data, such as test steps, for example.2XrayREST APIv1, v2

    managed by Jira server/DC

    • importing test results
    • import/exporting Cucumber scenarios
    • importing test results
    • import/exporting Cucumber scenarios

    Info
    titlePlease note
    • Xray server/DC doesn't provide a GraphQL API
    • Xray server/DC REST API is
    Info
    titlePlease note
    • Xray server/DC doesn't provide a GraphQL API
    • Xray server/DC REST API is different from Xray Cloud REST API; some endpoints may be similar, like for importing test automation results, but there will be differences
    • Xray server/DC doesn't provide API Keys (pair client id + client secret), as it happens with Xray Cloud. Please check instead Personal Access Tokens (since v8.14, for Jira DC only)
    Info
    titleXray REST API v1 and v2 on Xray server/DC. What are the differences?

    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

    ...