License API
- Self-hosted
The License API allows you to check the license status, generate license request codes, and apply signed licenses programmatically.
Tip
For complete API documentation, including request/response schemas, visit the API docs.
All endpoints use the base URL of your Qualytics deployment (for example, https://your-instance.qualytics.io/api).
In the examples, YOUR_TOKEN is an API token for a Qualytics user with the Admin role. It is not the container registry token, deployment identifier, license request, or signed license.
Get License Info
Retrieve the license expiration date, deployment type, and grace period information.
Endpoint: GET /api/license/expiration
Permission: Admin user role
Example request and response
Request:
curl -X GET "https://your-instance.qualytics.io/api/license/expiration" \
-H "Authorization: Bearer YOUR_TOKEN"
Response (active license):
{
"license_expiration": "2027-12-30T21:00:00Z",
"is_saas_deployment": false,
"days_since_first_db_creation": 45
}
Response (no license):
Response Schema
| Field | Type | Description |
|---|---|---|
license_expiration |
datetime or null |
The license expiration date in UTC. null if no license exists. |
is_saas_deployment |
boolean |
If true, this is a managed deployment and the UI hides license management. |
days_since_first_db_creation |
integer or null |
Days since the first datastore was created (the field name uses db as shorthand for datastore, not database). Used to calculate the remaining days in the 31-day grace period. null if no datastores exist. |
For the UI equivalent, see the Introduction page.
Generate License Request
Generate an encoded license request code for an initial or renewed signed license.
Endpoint: GET /api/license/request
Permission: Admin user role
Example request and response
Request:
curl -X GET "https://your-instance.qualytics.io/api/license/request" \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
Response Schema
| Field | Type | Description |
|---|---|---|
license_request |
string |
An encoded license request containing your deployment's fingerprint. Contact your Qualytics account team or support team to arrange an approved secure transfer method for the request and signed license. Do not place either value in ordinary email. |
For the UI equivalent, see the Generate License Request page.
Assign License
Apply a new or renewed signed license to the deployment.
Note
This endpoint is called Assign License in the API, but corresponds to the Update License button in the UI. Both apply a signed license to the deployment.
Endpoint: POST /api/license/assign
Permission: Admin user role
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
signed_license |
string |
Yes | An unexpired signed license from Qualytics. |
Example request
Request:
curl -X POST "https://your-instance.qualytics.io/api/license/assign" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"signed_license": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}'
Response: 204 No Content (empty body)
For the UI equivalent, see the Update License page.
Error Responses
| Status Code | Description |
|---|---|
400 Bad Request |
Invalid signed license due to its signature, format, expiration, or fingerprint. Also returned when deployment data is in an invalid state. |
401 Unauthorized |
Missing or invalid API token. |
403 Forbidden |
User does not have the Admin role. |
Error response examples
403 Forbidden:
400 Bad Request (invalid license signature):
{ "detail": "Invalid license signature. Please contact your Qualytics account manager for assistance." }
400 Bad Request (expired license):
400 Bad Request (fingerprint mismatch):
{ "detail": "License is invalid due to fingerprint mismatch. Please contact your Qualytics account manager for assistance" }
400 Bad Request (invalid format):
400 Bad Request (missing required field):
400 Bad Request (invalid deployment state):
{ "detail": "This deployment's data is in an invalid state. Please contact your Qualytics account representative" }
400 Bad Request (grace period exceeded, no license):
Permission Summary
| Operation | Minimum Permission |
|---|---|
| Get license info | Admin user role |
| Generate license request | Admin user role |
| Assign license | Admin user role |
Info
All License API endpoints require the Admin role. See the Permissions page for the full matrix.