{
  "id": "ldap_mappings",
  "title": "LDAP mappings requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/ldap_mappings/",
  "summary": "LDAP mappings requests",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-all-ldap_mappings) | `/v1/ldap_mappings` | Get all LDAP mappings |\n| [GET](#get-ldap_mapping) | `/v1/ldap_mappings/{uid}` | Get a single LDAP mapping |\n| [PUT](#put-ldap_mapping) | `/v1/ldap_mappings/{uid}` | Update an LDAP mapping |\n| [POST](#post-ldap_mappings) | `/v1/ldap_mappings` | Create a new LDAP mapping |\n| [DELETE](#delete-ldap_mappings) | `/v1/ldap_mappings/{uid}` | Delete an LDAP mapping |\n\n## Get all LDAP mappings {#get-all-ldap_mappings}\n\n\tGET /v1/ldap_mappings\n\nGet all LDAP mappings.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_all_ldap_mappings_info]() |\n\n### Request {#get-all-request} \n\n#### Example HTTP request\n\n\tGET /v1/ldap_mappings \n\n#### Request 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 [LDAP mapping objects]().\n\n#### Example JSON body\n\n```json\n[\n  {\n     \"uid\": 17,\n     \"name\": \"Admins\",\n     \"dn\": \"OU=ops.group,DC=redislabs,DC=com\",\n     \"email\": \"ops.group@redislabs.com\",\n     \"role_uids\": [1],\n     \"email_alerts\": true,\n     \"bdbs_email_alerts\": [\"1\",\"2\"],\n     \"cluster_email_alerts\": true\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\n## Get LDAP mapping {#get-ldap_mapping}\n\n\tGET /v1/ldap_mappings/{int: uid}\n\nGet a specific LDAP mapping.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_ldap_mapping_info]() |\n\n### Request {#get-request} \n\n#### Example HTTP request\n\n\tGET /v1/ldap_mappings/1 \n\n#### Request 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 object's unique ID. |\n\n### Response {#get-response} \n\nReturns an [LDAP mapping object]().\n\n#### Example JSON body\n\n```json\n{\n     \"uid\": 17,\n     \"name\": \"Admins\",\n     \"dn\": \"OU=ops.group,DC=redislabs,DC=com\",\n     \"email\": \"ops.group@redislabs.com\",\n     \"role_uids\": [1],\n     \"email_alerts\": true,\n     \"bdbs_email_alerts\": [\"1\",\"2\"],\n     \"cluster_email_alerts\": true\n}\n```\n\n### Error codes {#get-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| ldap_mapping_not_exist | An object does not exist| \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) | ldap_mapping does not exist. |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support LDAP mappings yet. |\n\n## Update LDAP mapping {#put-ldap_mapping}\n\n\tPUT /v1/ldap_mappings/{int: uid}\n\nUpdate an existing ldap_mapping object.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [update_ldap_mapping]() |\n\n### Request {#put-request} \n\n#### Example HTTP request\n\n\tPUT /v1/ldap_mappings/17 \n\n#### Example JSON body\n\n```json\n{\n    \"dn\": \"OU=ops,DC=redislabs,DC=com\",\n    \"email\": \"ops@redislabs.com\",\n    \"email_alerts\": true,\n    \"bdbs_email_alerts\": [\"1\",\"2\"],\n    \"cluster_email_alerts\": true\n}\n```\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### Request body\n\nInclude an [LDAP mapping object]() with updated fields in the request body.\n\n### Response {#put-response} \n\n#### Example JSON body\n\n```json\n{\n     \"uid\": 17,\n     \"name\": \"Admins\",\n     \"dn\": \"OU=ops,DC=redislabs,DC=com\",\n     \"email\": \"ops@redislabs.com\",\n     \"role_uids\": [1],\n     \"email_alerts\": true,\n     \"bdbs_email_alerts\": [\"1\",\"2\"],\n     \"cluster_email_alerts\": true\n}\n```\n\n### Error codes {#put-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| ldap_mapping_not_exist | An object does not exist| \n| invalid_dn_param | A dn parameter has an illegal value| \n| invalid_name_param | A name parameter has an illegal value| \n| invalid_role_uids_param | A role_uids parameter has an illegal value| \n| invalid_account_id_param | An account_id 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, LDAP mapping is created. |\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-existing LDAP mapping. |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support LDAP mapping yet. |\n\n## Create LDAP mapping {#post-ldap_mappings}\n\n\tPOST /v1/ldap_mappings\n\nCreate a new LDAP mapping.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [create_ldap_mapping]() |\n\n### Request {#post-request} \n\n#### Example HTTP request\n\n\tPOST /v1/ldap_mappings \n\n#### Example JSON body\n\n```json\n{\n     \"name\": \"Admins\",\n     \"dn\": \"OU=ops.group,DC=redislabs,DC=com\",\n     \"email\": \"ops.group@redislabs.com\",\n     \"role_uids\": [1]\n}\n```\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### Request body\n\nInclude an [LDAP mapping object]() in the request body.\n\n### Response {#post-response} \n\n#### Example JSON body\n\n```json\n{\n     \"uid\": 17,\n     \"name\": \"Admins\",\n     \"dn\": \"OU=ops.group,DC=redislabs,DC=com\",\n     \"email\": \"ops.group@redislabs.com\",\n     \"role_uids\": [1]\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_dn_param | A dn parameter has an illegal value| \n| invalid_name_param | A name parameter has an illegal value| \n| invalid_role_uids_param | A role_uids 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, an LDAP-mapping object 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 LDAP mappings yet. |\n\n## Delete LDAP mapping {#delete-ldap_mappings}\n\n\tDELETE /v1/ldap_mappings/{int: uid}\n\nDelete an LDAP mapping object.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [delete_ldap_mapping]() |\n\n### Request {#delete-request} \n\n#### Example HTTP request\n\n\tDELETE /v1/ldap_mappings/1 \n\n#### Request 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 ldap_mapping unique ID. |\n\n### Response {#delete-response} \n\nReturns a status code. If an error occurs, the response body may include a more specific error code and message.\n\n### Error codes {#delete-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| ldap_mapping_not_exist | An object does not exist| \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 ldap_mapping is deleted. |\n| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. |\n| [501 Not Implemented](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2) | Cluster doesn't support LDAP mappings yet. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "children": []
}

