{
  "id": "redis_acls",
  "title": "Redis access control list (ACL) requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/redis_acls/",
  "summary": "Redis access control list (ACL) requests",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-all-redis_acls) | `/v1/redis_acls` | Get all Redis ACLs |\n| [GET](#get-redis_acl) | `/v1/redis_acls/{uid}` | Get a single Redis ACL |\n| [PUT](#put-redis_acl) | `/v1/redis_acls/{uid}` | Update a Redis ACL |\n| [POST](#post-redis_acl) | `/v1/redis_acls` | Create a new Redis ACL |\n| [DELETE](#delete-redis_acl) | `/v1/redis_acls/{uid}` | Delete a Redis ACL |\n\n## Get all Redis ACLs {#get-all-redis_acls}\n\n```sh\nGET /v1/redis_acls\n```\n\nGet all Redis ACL objects.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [view_all_redis_acls_info]() | admin\u003cbr /\u003ecluster_member\u003cbr /\u003ecluster_viewer\u003cbr /\u003edb_member\u003cbr /\u003edb_viewer\u003cbr /\u003euser_manager |\n\n### Request {#get-all-request}\n\n#### Example HTTP request\n\n```sh\nGET /v1/redis_acls\n```\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n### Response {#get-all-response}\n\nReturns a JSON array of [Redis ACL objects]().\n\n#### Example JSON body\n\n```json\n[\n    {\n     \"uid\": 1,\n     \"name\": \"Full Access\",\n     \"acl\": \"+@all ~*\"\n    },\n    {\n     \"uid\": 2,\n     \"name\": \"Read Only\",\n     \"acl\": \"+@read ~*\"\n    },\n    {\n     \"uid\": 3,\n     \"name\": \"Not Dangerous\",\n     \"acl\": \"+@all -@dangerous ~*\"\n    },\n    {\n     \"uid\": 17,\n     \"name\": \"Geo\",\n     \"acl\": \"~* +@geo\"\n    }\n]\n```\n\n### Status codes {#get-all-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. |\n\n## Get Redis ACL {#get-redis_acl}\n\n```sh\nGET /v1/redis_acls/{int: uid}\n```\n\nGet a single Redis ACL object.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [view_redis_acl_info]() | admin\u003cbr /\u003ecluster_member\u003cbr /\u003ecluster_viewer\u003cbr /\u003edb_member\u003cbr /\u003edb_viewer\u003cbr /\u003euser_manager |\n\n### Request {#get-request}\n\n#### Example HTTP request\n\n```sh\nGET /v1/redis_acls/1\n```\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The object's unique ID. |\n\n### Response {#get-response}\n\nReturns a [Redis ACL object]().\n\n#### Example JSON body\n\n```json\n{\n     \"uid\": 17,\n     \"name\": \"Geo\",\n     \"acl\": \"~* +@geo\"\n}\n```\n\n### Status codes {#get-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success. |\n| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Operation is forbidden. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | redis_acl does not exist. |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. |\n\n## Update Redis ACL {#put-redis_acl}\n\n```sh\nPUT /v1/redis_acls/{int: uid}\n```\n\nUpdate an existing Redis ACL object.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [update_redis_acl]() | admin\u003cbr /\u003euser_manager |\n\n### Request {#put-request}\n\n#### Example HTTP request\n\n```sh\nPUT /v1/redis_acls/17\n```\n\n#### Example JSON body\n\n```json\n{\n     \"acl\": \"~* +@geo -@dangerous\"\n}\n```\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n#### Query parameters\n\n| Field   | Type | Description |\n|---------|------|---------------|\n| dry_run |  | Validate the updated [Redis ACL object]() but don't apply the update. |\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The Redis ACL's unique ID. |\n\n#### Request body\n\nInclude a [Redis ACL object]() with updated fields in the request body.\n\n### Response {#put-response}\n\nReturns the updated [Redis ACL object]().\n\n#### Example JSON body\n\n```json\n{\n     \"uid\": 17,\n     \"name\": \"Geo\",\n     \"acl\": \"~* +@geo -@dangerous\"\n}\n```\n\n### Error codes {#put-error-codes}\n\n| Code | Description |\n|------|-------------|\n| 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.|\n| name_already_exists | An object of the same type and name exists|\n| invalid_param | A parameter has an illegal value|\n\n### Status codes {#put-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, redis_acl was updated. |\n| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to change a non-existent redis_acl. |\n| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Cannot change a read-only object |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. |\n\n## Create Redis ACL {#post-redis_acl}\n\n```sh\nPOST /v1/redis_acls\n```\n\nCreate a new Redis ACL object.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [create_redis_acl]() | admin\u003cbr /\u003euser_manager |\n\n### Request {#post-request}\n\n#### Example HTTP request\n\n```sh\nPOST /v1/redis_acls\n```\n\n#### Example JSON body\n\n```json\n{\n     \"name\": \"Geo\",\n     \"acl\": \"~* +@geo\"\n}\n```\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n#### Query parameters\n\n| Field   | Type | Description |\n|---------|------|---------------|\n| dry_run |  | Validate the new [Redis ACL object]() but don't apply the update. |\n\n#### Request body\n\nInclude a [Redis ACL object]() in the request body.\n\n### Response {#post-response}\n\nReturns the newly created [Redis ACL object]().\n\n#### Example JSON body\n\n```json\n{\n     \"uid\": 17,\n     \"name\": \"Geo\",\n     \"acl\": \"~* +@geo\"\n}\n```\n\n### Error codes {#post-error-codes}\n\nPossible `error_code` values:\n\n| Code | Description |\n|------|-------------|\n| 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. |\n| name_already_exists | An object of the same type and name exists |\n| missing_field | A needed field is missing |\n| invalid_param | A parameter has an illegal value |\n\n### Status codes {#post-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, redis_acl is created. |\n| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. |\n\n### Examples\n\n#### cURL\n\n```sh\ncurl -k -u \"[username]:[password]\" -X POST \\\n     -H 'Content-Type: application/json' \\\n     -d '{ \"name\": \"Geo\", \"acl\": \"~* +@geo\" }' \\\n     https://[host][:port]/v1/redis_acls\n```\n\n#### Python\n\n```python\nimport requests\nimport json\n\nurl = \"https://[host][:port]/v1/redis_acls\"\n\nheaders = {\n  'Content-Type': 'application/json'\n}\n\npayload = json.dumps({\n    \"name\": \"Geo\",\n    \"acl\": \"~* +@geo\"\n})\nauth=(\"[username]\", \"[password]\")\n\nresponse = requests.request(\"POST\", url,\n           auth=auth, headers=headers, payload=payload, verify=False)\n\nprint(response.text)\n```\n\n## Delete Redis ACL {#delete-redis_acl}\n\n```sh\nDELETE /v1/redis_acls/{int: uid}\n```\n\nDelete a Redis ACL object.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [delete_redis_acl]() | admin\u003cbr /\u003euser_manager |\n\n### Request {#delete-request}\n\n#### Example HTTP request\n\n```sh\nDELETE /v1/redis_acls/1\n```\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The redis_acl unique ID. |\n\n### Response {#delete-response}\n\nReturns a status code that indicates the Redis ACL deletion success or failure.\n\n### Status codes {#delete-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the redis_acl is deleted. |\n| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. |\n| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Cannot delete a read-only object |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support redis_acl yet. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "children": []
}

