Install a license file (admin)
const url = 'http://127.0.0.1:8080/v1/admin/license';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"v":1,"kid":"example","claims":"example","sig":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:8080/v1/admin/license \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "v": 1, "kid": "example", "claims": "example", "sig": "example" }'The body is the license file as downloaded, at most 16 KiB. A file
that does not verify against the keys this build trusts gets 422
license_invalid. A file whose 30-day grace after expiry has ended
gets 422 license_expired. Either way the installed license stays. An install
replaces the license for the whole coordinator and is audited as
license.installed with the license ID, org, tier, and expiry.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A signed license file (ADR-0013 section 9). Other fields are ignored.
object
The signing key’s ID.
The claims JSON, base64url without padding.
The Ed25519 signature, base64url without padding.
Responses
Section titled “Responses”The status with the new license.
object
True in phases active, expiring, and grace.
object
The license ID.
The buyer’s org ID in Zentri accounts.
Shown, not enforced.
The ADR-0002 features the license names. Names this build does not know are left out.
When ee/ features turn off. Present when a license is installed.
Something an admin should act on. Nothing is blocked by it.
object
Example
{ "phase": "none", "license": { "tier": "team", "features": [ "sso" ] }, "warnings": [ { "code": "license_expiring" } ]}No valid bearer token.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The token may not do this.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The body is over 16 KiB.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The request is well formed but breaks a rule or a limit.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}A rate limit or quota stopped the request. Retry-After gives seconds to wait.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}