Method Path Description
GET /v1/modules List available modules
GET /v1/modules/{uid} Get a specific module
POST /v1/modules Upload a new module
DELETE /v1/modules/{uid} Delete a module

List modules

GET /v1/modules

List available modules, i.e. modules stored within the CCS.

Required permissions

Permission name
view_cluster_modules

Request

Example HTTP request

GET /modules

Request headers

Key Value Description
Host 127.0.0.1:9443 Domain name
Accept */* Accepted media type

Response

Returns a JSON array of module objects.

Status codes

Code Description
200 OK No error

Get module

GET /v1/modules/{string: uid}

Get specific available modules, i.e. modules stored within the CCS.

Required permissions

Permission name
view_cluster_modules

Request

Example HTTP request

GET /modules/1

Request headers

Key Value Description
Host 127.0.0.1:9443 Domain name
Accept */* Accepted media type

URL parameters

Field Type Description
uid integer The module’s unique ID.

Response

Returns a module object.

Status codes

Code Description
200 OK No error
404 Not Found Module does not exist.

Upload module

POST /v1/modules

Uploads a new module into the CCS.

The request must contain a Redis module, bundled using RedisModule Packer.

Required permissions

Permission name
update_cluster

Request

Example HTTP request

POST /modules 

Request headers

Key Value Description
Host 127.0.0.1 Domain name
Accept */* Accepted media type
Content-Length 865 Length of the request body in octets
Expect 100-continue Requires particular server behaviors
Content-Type multipart/form-data; boundary=————————4751ac3b332ace13 Media type of request/response body

Response

Returns a status code. If an error occurs, the response body may include an error code and message with more details.

Error codes

When errors are reported, the server may return a JSON object with error_code and message field that provide additional information. The following are possible error_code values:

Code Description
no_module Module wasn’t provided
invalid_module Module either corrupted or packaged files are wrong
module_exists Module already in system
min_redis_pack_version Module isn’t supported yet in this Redis pack
unsupported_module_capabilities The module does not support required capabilities
os_not_supported This module is not supported for this operating system
dependencies_not_supported This endpoint does not support dependencies, see v2

Status codes

Code Description
400 Bad Request Either missing module file or an invalid module file.

Delete module

DELETE /v1/modules/{string: uid}

Delete a module.

Required permissions

Permission name
update_cluster

Request

Example HTTP request

DELETE /module/1 

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

URL parameters

Field Type Description
uid integer The module’s unique ID.

Response

Returns a status code to indicate module deletion success or failure.

Status codes

Code Description
200 OK Success, the module is deleted.
404 Not Found Attempting to delete a nonexistent module.
406 Not Acceptable The request is not acceptable.