Method Path Description
GET /v1/redis_acls Get all Redis ACLs
GET /v1/redis_acls/{uid} Get a single Redis ACL
PUT /v1/redis_acls/{uid} Update a Redis ACL
POST /v1/redis_acls Create a new Redis ACL
DELETE /v1/redis_acls/{uid} Delete a Redis ACL

Get all Redis ACLs

GET /v1/redis_acls

Get all Redis ACL objects.

Required permissions

Permission name
view_all_redis_acls_info

Request

Example HTTP request

GET /redis_acls 

Request headers

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

Response

Returns a JSON array of Redis ACL objects.

Example JSON body

[
    {
     "uid": 1,
     "name": "Full Access",
     "acl": "[email protected] ~*"
    },
    {
     "uid": 2,
     "name": "Read Only",
     "acl": "[email protected] ~*"
    },
    {
     "uid": 3,
     "name": "Not Dangerous",
     "acl": "[email protected] [email protected] ~*"
    },
    {
     "uid": 17,
     "name": "Geo",
     "acl": "~* [email protected]"
    }
]

Status codes

Code Description
200 OK No error
501 Not Implemented Cluster doesn’t support redis_acl yet.

Get Redis ACL

GET /v1/redis_acls/{int: uid}

Get a single Redis ACL object.

Required permissions

Permission name
view_redis_acl_info

Request

Example HTTP request

GET /redis_acls/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 object’s unique ID.

Response

Returns a Redis ACL object.

Example JSON body

{
     "uid": 17,
     "name": "Geo",
     "acl": "~* [email protected]"
}

Status codes

Code Description
200 OK Success.
403 Forbidden Operation is forbidden.
404 Not Found redis_acl does not exist.
501 Not Implemented Cluster doesn’t support redis_acl yet.

Update Redis ACL

PUT /v1/redis_acls/{int: uid}

Update an existing Redis ACL object.

Required permissions

Permission name
update_redis_acl

Request

Example HTTP request

PUT /redis_acls/17 

Example JSON body

Request headers

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

Request body

Include a Redis ACL object with updated fields in the request body.

Response

Returns the updated Redis ACL object.

Example JSON body

{
     "uid": 17,
     "name": "Geo",
     "acl": "~* [email protected] [email protected]"
}

Error codes

Possible error_code values:

Code Description
unsupported_resource The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.
name_already_exists An object of the same type and name exists
invalid_param A parameter has an illegal value

Status codes

Code Description
200 OK Success, redis_acl was updated.
400 Bad Request Bad or missing configuration parameters.
404 Not Found Attempting to change a non-existent redis_acl.
409 Conflict Cannot change a read-only object
501 Not Implemented Cluster doesn’t support redis_acl yet.

Create Redis ACL

POST /v1/redis_acls

Create a new Redis ACL object.

Required permissions

Permission name
create_redis_acl

Request

Example HTTP request

POST /redis_acls 

Example JSON body

{
     "name": "Geo",
     "acl": "~* [email protected]"
}

Request headers

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

Request body

Include a Redis ACL object in the request body.

Response

Returns the newly created Redis ACL object.

Example JSON body

{
     "uid": 17,
     "name": "Geo",
     "acl": "~* [email protected]"
}

Error codes

Possible error_code values:

Code Description
unsupported_resource The cluster is not yet able to handle this resource type. This could happen in a partially upgraded cluster, where some of the nodes are still on a previous version.
name_already_exists An object of the same type and name exists
missing_field A needed field is missing
invalid_param A parameter has an illegal value

Status codes

Code Description
200 OK Success, redis_acl is created.
400 Bad Request Bad or missing configuration parameters.
501 Not Implemented Cluster doesn’t support redis_acl yet.

Delete Redis ACL

DELETE /v1/redis_acls/{int: uid}

Delete a Redis ACL object.

Required permissions

Permission name
delete_redis_acl

Request

Example HTTP request

DELETE /redis_acls/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 redis_acl unique ID.

Response

Returns a status code that indicates the Redis ACL deletion success or failure.

Status codes

Code Description
200 OK Success, the redis_acl is deleted.
406 Not Acceptable The request is not acceptable.
409 Conflict Cannot delete a read-only object
501 Not Implemented Cluster doesn’t support redis_acl yet.