Add or replace the license key
const url = 'http://localhost:8080/api/v1/license';const options = { method: 'PUT', headers: { cookie: 'brokerium_session=<brokerium_session>', 'X-Brokerium-Request': '1', 'Content-Type': 'application/json' }, body: '{"key":"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://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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Required on every non-GET request.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The license key brk-lic-1.<payload>.<signature>; whitespace is ignored.
Example generated
{ "key": "example"}Responses
Section titled “Responses”The key is stored.
object
object
The license covers the feature and is valid or in its grace period.
The license key in use. For a key that does not verify only state, source and error are set.
object
Feature ids, or * for all features.
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.
BROKERIUM_LICENSE, BROKERIUM_LICENSE_FILE or the key stored through this API.
Why the key cannot be used.
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).
object
object
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).
object
object
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.