Search code examples
jira-xray

How to call xRay API gadget?


I using Jira Cloud with xRay. I would like call the API than gadget use. API used by gadget have better performance and time response than GraphQL API.

When I analyze in developper console on my brower I see URL used by the xray gadget on Jira dashboard: https://xray.cloud.getxray.app/api/internal/gadget/testrunssummary/testruns and I see a header X-acpt with a token value I know how to generate a token for xRAY with a call to POST https://xray.cloud.getxray.app/api/v2/authenticate then I put value in x-acpt header but when I do a POST https://xray.cloud.getxray.app/api/internal/gadget/testrunssummary/testruns I have

{ "error": "Authentication request has expired. Try reloading the page." }

Someone know how to call API xray used by gadget ?


Solution

  • The gadgets provided by Xray use internal APIs, which are not public and may change at any time; you shouldn't use them directly. You cannot customize the endpoint and associated logic of the built-in Xray gadgets.