Skip to content

Add or replace the license key

PUT
/api/v1/license
curl --request PUT \
--url http://localhost:8080/api/v1/license \
--header 'Content-Type: application/json' \
--header 'X-Brokerium-Request: 1' \
--cookie brokerium_session=<brokerium_session> \
--data '{ "key": "example" }'

Role: admin. Enterprise builds only. Verifies the key offline and stores it in the database; keys that expired or are not valid yet are refused. Audited as license.update without the key text.

X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Media typeapplication/json
object
key
required

The license key brk-lic-1.<payload>.<signature>; whitespace is ignored.

string

Example generated

{
"key": "example"
}

The key is stored.

Media typeapplication/json
object
edition
required
string
Allowed values: community enterprise
features
required
Array<object>
object
id
required
string
title
required
string
description
required
string
licensed
required

The license covers the feature and is valid or in its grace period.

boolean
license
required
One of:

The license key in use. For a key that does not verify only state, source and error are set.

object
id
required
string
customer
required
string
email
required
string
features
required

Feature ids, or * for all features.

Array<string>
issuedAt
string format: date-time
notBefore
string format: date-time
expiresAt
string format: date-time
graceEndsAt
string format: date-time
state
required

Valid from notBefore until expiresAt, grace until graceEndsAt, then expired; invalid when the key does not verify or is not valid yet. Enterprise features work in valid and grace.

string
Allowed values: invalid valid grace expired
source
required

BROKERIUM_LICENSE, BROKERIUM_LICENSE_FILE or the key stored through this API.

string
Allowed values: environment file database
error

Why the key cannot be used.

string

Example

{
"edition": "community",
"features": [
{
"id": "message-tools"
}
],
"license": {
"state": "invalid",
"source": "environment"
}
}

The key does not verify, expired or is not valid yet (invalid_license).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The server runs the Community edition (edition_required), or the key comes from BROKERIUM_LICENSE or BROKERIUM_LICENSE_FILE and can only be changed there (license_managed_externally).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.