XRAY: How to apply Xray trial license using the UI REST API call

Products
JFrog_Xray
Content Type
REST_API
AuthorFullName__c
Shashwath Rai
articleNumber
000006545
FirstPublishedDate
2025-08-17T08:10:51Z
lastModifiedDate
2025-08-14

XRAY: How to apply Xray trial license using the UI REST API call

We can apply the Xray trial license directly from the JFrog Platform GUI, as explained in this article or we can use Rest API procedure.
If you encounter any issues while adding the trail license via the GUI, you can use the UI REST API method described below.

1. Create the license.json file

Add the following content, replacing <XRAY TRIAL LICENSE> with the actual trial license key:
{
  "id": "",
  "key": "<XRAY TRIAL LICENSE>",
  "license_to": "",
  "license_type": "",
  "valid_until": ""
}

2. Execute the REST API command

Use the command below to add the trial license to your JFrog instance. Replace the credentials and <JFrog-URL> with actual values:
curl -u 'username:password' -X PUT <JFrog-URL>/xray/ui/license -H 'Content-Type: application/json' --data-binary '@license.json'

Once the API is executed successfully, the trial license will be applied to JFrog Xray and we should be able to access all functionalities as expected.