Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using GraphQL API : Retrieving History of Default Version Changes in Versioned Test Cases

Sanjay Shukla April 16, 2025

Hi everyone,

 

I’m currently working on integrating and automating workflows using the GraphQL API provided by Xray Enterprise for Jira. My focus is on handling versioned test cases. As part of this process, I’ve been trying to programmatically retrieve the history of changes that occur when the default version of a test case is switched.

Context:

In Xray Enterprise for Jira, it is possible to create multiple versions of a test case. One useful feature is the ability to set a “default” version. In our workflow, it is crucial to know:

  • When a test case’s default version was changed.
  • What the previous default version was and what it was changed to.
  • Who made the change (i.e., user metadata).
  • Any additional metadata around the change event. 

What I’ve Tried So Far

  • I have reviewed the Xray Enterprise documentation related to versioning and the GraphQL API but haven’t found any explicit queries or mutations that allow retrieval of historical changes regarding default test case versions.
  • I searched through the schema introspection (using GraphiQL) for fields or mutations that might expose version history or audit logs relevant to default version switches, but there’s no direct reference to this level of history or change metadata.

Specific Questions 

  1. Tracking Version History:
    • Is there a GraphQL query available that can retrieve historical changes (i.e., a change log) specific to versioned test cases, especially regarding default version changes?
    • If so, which query or field should be used, and what arguments are necessary?
  2. Detecting Version Switches:
    • How can we detect programmatically which version was previously the default and what it was updated to?
    • Are there any fields in the GraphQL schema that provide “previous value” and “current value” for such version changes?
  3. Metadata on Changes:
    • What information (e.g., timestamp, user who made the change) is exposed via the API when a test case’s version is switched?
    • How can we access these metadata attributes using GraphQL?

Workarounds Considered

  • If the GraphQL API does not support retrieving such historical data, are there alternative approaches within Xray Enterprise (for example, using Jira’s audit logs via REST API or leveraging webhooks) that might be used to capture these events

 

1 answer

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2025

Hi @Sanjay Shukla 

Going over the Xray cloud documentation there is no reference in Rest of GraphQL api to versioning.

So probably this is not an option.

You could contact the vendor via their support channel and ask what options there might be.

Sanjay Shukla April 17, 2025

@Marc - Devoteam , Can you let me know where I can raise these issues?

Francisco Fonseca _Xray_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2025

Hi @Sanjay Shukla ,

 

To best understand the use case and provide with the best support, reach us out here: https://jira.getxray.app/servicedesk/customer/portal/2

 

Best, Francisco

Suggest an answer

Log in or Sign up to answer