Method | Path | Description |
---|
GET | /v1/ldap_mappings | Get all LDAP mappings |
GET | /v1/ldap_mappings/{uid} | Get a single LDAP mapping |
PUT | /v1/ldap_mappings/{uid} | Update an LDAP mapping |
POST | /v1/ldap_mappings | Create a new LDAP mapping |
DELETE | /v1/ldap_mappings/{uid} | Delete an LDAP mapping |
Get all LDAP mappings
GET /v1/ldap_mappings
Get all LDAP mappings.
Required permissions
Request
Example HTTP request
GET /ldap_mappings
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
Response
Returns a JSON array of LDAP mapping objects.
Example JSON body
[
{
"uid": 17,
"name": "Admins",
"dn": "OU=ops.group,DC=redislabs,DC=com",
"email": "ops.group@redislabs.com",
"role_uids": ["1"],
"email_alerts": true,
"bdbs_email_alerts": ["1","2"],
"cluster_email_alerts": true
}
]
Status codes
Get LDAP mapping
GET /v1/ldap_mappings/{int: uid}
Get a specific LDAP mapping.
Required permissions
Request
Example HTTP request
GET /ldap_mappings/1
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 an LDAP mapping object.
Example JSON body
{
"uid": 17,
"name": "Admins",
"dn": "OU=ops.group,DC=redislabs,DC=com",
"email": "ops.group@redislabs.com",
"role_uids": ["1"],
"email_alerts": true,
"bdbs_email_alerts": ["1","2"],
"cluster_email_alerts": true
}
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. |
ldap_mapping_not_exist | An object does not exist |
Status codes
Update LDAP mapping
PUT /v1/ldap_mappings/{int: uid}
Update an existing ldap_mapping object.
Required permissions
Request
Example HTTP request
PUT /ldap_mappings/17
Example JSON body
{
"dn": "OU=ops,DC=redislabs,DC=com",
"email": "ops@redislabs.com",
"email_alerts": true,
"bdbs_email_alerts": ["1","2"],
"cluster_email_alerts": true
}
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
Request body
Include an LDAP mapping object with updated fields in the request body.
Response
Example JSON body
{
"uid": 17,
"name": "Admins",
"dn": "OU=ops,DC=redislabs,DC=com",
"email": "ops@redislabs.com",
"role_uids": ["1"],
"email_alerts": true,
"bdbs_email_alerts": ["1","2"],
"cluster_email_alerts": true
}
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 |
ldap_mapping_not_exist | An object does not exist |
invalid_dn_param | A dn parameter has an illegal value |
invalid_name_param | A name parameter has an illegal value |
invalid_role_uids_param | A role_uids parameter has an illegal value |
invalid_account_id_param | An account_id parameter has an illegal value |
Status codes
Create LDAP mapping
POST /v1/ldap_mappings
Create a new LDAP mapping.
Required permissions
Request
Example HTTP request
POST /ldap_mappings
Example JSON body
{
"name": "Admins",
"dn": "OU=ops.group,DC=redislabs,DC=com",
"email": "ops.group@redislabs.com",
"role_uids": ["1"]
}
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
Request body
Include an LDAP mapping object in the request body.
Response
Example JSON body
{
"uid": 17,
"name": "Admins",
"dn": "OU=ops.group,DC=redislabs,DC=com",
"email": "ops.group@redislabs.com",
"role_uids": ["1"]
}
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_dn_param | A dn parameter has an illegal value |
invalid_name_param | A name parameter has an illegal value |
invalid_role_uids_param | A role_uids parameter has an illegal value |
Status codes
Delete LDAP mapping
DELETE /v1/ldap_mappings/{int: uid}
Delete an LDAP mapping object.
Required permissions
Request
Example HTTP request
DELETE /ldap_mappings/1
Key | Value | Description |
---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
URL parameters
Field | Type | Description |
---|
uid | integer | The ldap_mapping unique ID. |
Response
Returns a status code. If an error occurs, the response body may include a more specific error code and message.
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. |
ldap_mapping_not_exist | An object does not exist |
Status codes