How do I check license status for Xray, and remove trial licenses?

Matthew Wang
2023-01-22 11:10

You can check if your Xray instance has a trial license with the below API:

For 3.x:
curl -u: http:///xray/api/v1/license
{"id":"","key":"","license_to":"JFrog","valid_until":"UTC","license_type":"Trial"}
For 2.x:
curl -u: http:///api/v1/license
{"id":"","key":"","license_to":"JFrog","valid_until":"UTC","license_type":"Trial"}

No trial license will return no data.


         

You can run the below to remove a trial license via API:

For 7.x:
curl -u: -X DELETE http:///xray/api/v1/license
{"info":"License deleted successfully"}
For 6.x:
curl -u: -X DELETE http:///api/v1/license
{"info":"License deleted successfully"}

You can run the below API to check the license status:

For 7.x
curl -u: http:///xray/api/v1/license/status
{“status”:“Enterprise”}

For 6.x:
curl -u: http:///api/v1/license/status {“status”:“Enterprise”}