MethodPathDescription
GET/v1/licenseGet license details
PUT/v1/licenseUpdate the license

Get license

GET /v1/license

Returns the license details, including license string, expiration, and supported features.

Required permissions

Permission name
view_license

Request

Example HTTP request

GET /license 

Request headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

Response

Returns a JSON object that contains the license details:

NameType/ValueDescription
licensestringLicense data
cluster_namestringThe cluster name (FQDN)
expiredbooleanIf the cluster key is expired (true or false)
activation_datestringThe date of the cluster key activation
expiration_datestringThe date of the cluster key expiration
keystringLicense key
featuresarray of stringsFeatures supported by the cluster
ownerstringLicense owner
shards_limitintegerThe total number of shards allowed by the cluster key
ram_shards_limitintegerThe number of RAM shards allowed by the cluster key (as of v7.2)
ram_shards_in_useintegerThe number of RAM shards in use
flash_shards_limitintegerThe number of flash shards (Auto Tiering) allowed by the cluster key (as of v7.2)
flash_shards_in_useintegerThe number of flash shards in use

Example JSON body

{
    "license": "----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n",
    "expired": true,
    "activation_date":"2018-12-31T00:00:00Z",
    "expiration_date":"2019-12-31T00:00:00Z",
    "ram_shards_in_use": 0,
    "ram_shards_limit": 300,
    "flash_shards_in_use": 0,
    "flash_shards_limit": 100,
    "shards_limit": 400,
    "features": ["bigstore"],
    "owner": "Redis",
    "cluster_name": "mycluster.local",
    "key": "----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n"
}

Status codes

CodeDescription
200 OKLicense is returned in the response body.
404 Not FoundNo license is installed.

Update license

PUT /v1/license

Validate and install a new license string.

If you do not provide a valid license, the cluster behaves as if the license was deleted. See Expired cluster license for a list of available actions and restrictions.

Required permissions

Permission name
install_new_license

Request

The request must be a JSON object with a single key named “license”.

Example HTTP request

PUT /license 

Example JSON body

{
    "license": "----- LICENSE START -----\ndi+iK...KniI9\n----- LICENSE END -----\n"
}

Request headers

KeyValueDescription
Acceptapplication/jsonAccepted media type

Request body

Include a JSON object that contains the new license string in the request body.

Response

Returns an error if the new license is not valid.

Status codes

CodeDescription
200 OKLicense installed successfully.
400 Bad RequestInvalid request, either bad JSON object or corrupted license was supplied.
406 Not AcceptableLicense violation. A response body provides more details on the specific cause.