Skip to main content

Access Control (REST) API - LDAP Team Mappings

This section includes REST APIs for working with Access Control LDAP Team Mapping tasks.

Get LDAP Team Mapping - GET /LDAPTeamMappings

Get details of all LDAP team mapping.

Usage:

  1. GET /LDAPServers and get details of all LDAP Servers

  2. GET /LDAPTeamMappings?ldapServerId={id} and get the specific LDAP team mapping

URL

/cxrestapi/auth/LDAPTeamMappings

Method:

GET

Media Type (header):

Authorization: Bearer <access token value>

Accept: application/json;v=1.0

Parameters

Optional:

ldapServerId=[integer] - Unique Id of the LDAP Server. LDAP Server Id (ldapServerId) is retrieved using the LDAP Servers API.

teamId=[integer] – Unique Id of the Team

Success Response:

Code: 200 Success

Error Response:

Code: 400 Bad Request

Code: 401 Unauthorized

Code: 403 Forbidden

Sample Response:

[
  {
    "id": 2,
    "ldapServerId": 1,
    "teamId": 10,
    "ldapGroupDn": "cn=Uruguay,ou=groups,ou=testing,dc=example,dc=com",
    "ldapGroupDisplayName": "Uruguay"
  },
  {
    "id": 15,
    "ldapServerId": 1,
    "teamId": 1,
    "ldapGroupDn": "cn=Chad,ou=groups,ou=testing,dc=example,dc=com",
    "ldapGroupDisplayName": "Chad"
  },
  {
    "id": 16,
    "ldapServerId": 1,
    "teamId": 1,
    "ldapGroupDn": "cn=Cuba,ou=groups,ou=testing,dc=example,dc=com",
    "ldapGroupDisplayName": "Cuba"
  },
  {
    "id": 22,
    "ldapServerId": 1,
    "teamId": 1,
    "ldapGroupDn": "cn=Guam,ou=groups,ou=testing,dc=example,dc=com",
    "ldapGroupDisplayName": "Guam"
  }
]

Notes:

Retrieves details of all LDAP team mapping according to the defined parameters. LDAP Server Id (ldapServerId) is used in the LDAP Servers API, Team Id (teamId) is used in the Teams API and LDAP Group DN (ldapGroupDn) is used in the LDAP Servers API. If the request fails, it returns an error response.

Update LDAP Team Mapping - PUT /LDAPServers/{id}/TeamMappings

Update existing LDAP team mapping details according to LDAP Server Id.

Usage:

  1. GET /LDAPServers and get details of all LDAP Servers

  2. GET /LDAPTeamMappings?ldapServerId={id} and get the specific LDAP team mapping

  3. PUT /LDAPServers/{id}/TeamMappings and update LDAP team mapping details.

URL

/cxrestapi/auth/LDAPServers/{id}/TeamMappings

Method:

PUT

Media Type (header):

Authorization: Bearer <access token value>

Content-Type: application/json;v=1.0

Parameters

Required:

id=[integer] - Unique Id of the LDAP Server. LDAP Server Id (id) is retrieved using the LDAP Servers API.

ldapTeamMappingsViewModel=[body]: Specifies the LDAP team mapping details to update

teamId=[integer] – Unique Id of the Team. Team Id (teamId) is retrieved using the Teams API.

ldapGroupDn=[string] - LDAP group distinguished name (cn=Guam,ou=groups,ou=testing,dc=example,dc=com)

ldapGroupDisplayName=[string] - LDAP group display name (Guam)

Success Response:

Code: 204 Success

Error Response:

Code: 400 Bad Request

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

Sample Response:

no content

Notes:

Updates LDAP team mapping details according to defined parameters. Once the request is successful, it does not return any content. If the request fails, it returns an error response.

Delete LDAP Team Mapping - DELETE /LDAPTeamMappings/{id}

Delete LDAP team mapping according to LDAP team mapping Id.

Usage:

  1. GET /LDAPTeamMappings and get details of all LDAP team mapping

  2. DELETE /LDAPTeamMappings/{id} and delete the LDAP team mapping details

URL

/cxrestapi/auth/LDAPTeamMappings/{id}

Method:

DELETE

Media Type (header):

Authorization: Bearer <access token value>

Content-Type: application/json;v=1.0

Parameters

Required:

id=[integer] - Unique Id of LDAP team mapping

Success Response:

Code: 204 Success

Error Response:

Code: 400 Bad Request

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not found

Sample Response:

no content

Notes:

Deletes LDAP team mapping according to LDAP team mapping Id. Once the request is successful, it does not return any content. If the request fails, it returns an error response.