I am doing skill "Test plan to Xray test import" for that I need provide below in env file , how/where I will get these key's ot how generate the these keys.
XRAY_CLIENT_ID=
XRAY_CLIENT_SECRET=
These are the credentials for the Xray Cloud API – you don’t generate them in the code, you have to create them in Xray and then copy them into your .env file.
You can get them like this (Xray Cloud):
"sometimes under Jira settings → Apps → Xray → API Keys)"Could we get some uptodatw information, please? They are not there.
@Bacsányi _Kacsa_ Péter You will always find these there, but you need to be a Jira administrator to see this (and to generate the key).If you are not an administrator- then ask the administrator to generate them and provide you with the details (they can generate them for your user even if you are not an admin).
Hey! Adding the bits that usually trip people up, since the menu path above confused a few folks:
Where: you need to be a Jira admin. Go to Settings → Apps, and in the left sidebar under the Xray section open API Keys (Xray's docs call it "Global Settings: API Keys"). Click Create API Key and pick the user the key will act as. Not an admin? Ask one to create the key for your user. It runs with that user's Jira permissions.
Copy the secret right away: it's only shown once. The keys don't expire, but the token you get from them lasts 24 h.
Check your region: if your site uses data residency, use the regional host or authentication fails even with valid keys:
Quick test:curl -X POST https://xray.cloud.getxray.app/api/v2/authenticate -H "Content-Type: application/json" -d '{"client_id":"YOUR_ID","client_secret":"YOUR_SECRET"}'
curl -X POST https://xray.cloud.getxray.app/api/v2/authenticate -H "Content-Type: application/json" -d '{"client_id":"YOUR_ID","client_secret":"YOUR_SECRET"}'
Full disclosure: I work for the company behind Xray - Export and Import for Jira. It uses these same keys, in case you'd rather import test cases from CSV/Excel than script it.
It looks like you're new here. Sign in or register to get started.