Develop > API calls > LDAP APIs > Get LDAP users and groups

Get LDAP users and groups

Returns a list of user and groups in the configured LDAP server at the organization provider level.

URI Method Parameters Returns

http://[host]:[port]/csa/api/ldap/organization/{orgName}/type/{type}

POST
  • orgName - Organization name. For example, CSA-Provider.
  • type - User or group.
  • body- JSON input body. Search based on cn and roles

    Note: This API supports a wild card search for the JSON input parameter cn. For example, cn with "app" as the search term returns all users and groups whose name starts with "app."

200 - successful
400 - bad request
401 - not authorized
404 - not found
501 - Internal server error

Example

The following JSON was sent:

{ "cn":"A", "roles":["CODAR_APPLICATION_DEVELOPER","CODAR_APPLICATION_QA","CODAR_APPLICATION_ARCHITECT"] }

The following JSON was returned:

 { "@self": "/csa/api/ldap/", "@total_results": 3, "Organization": "/csa/CSA-Provider", "members": [ { "cn": "AppArchitect",  "dn": "CN=AppArchitect,CN=Users", "emailid": "",  "userAvatar": "https://10.1.9.115:8884/csa/thumbnails/apparchitect.jpg", "memberOf": "CN=ApplicationArchitect", "role":"Application Architect",  "type": "user"  }, { "cn": "appdev",  "dn": "CN=appdev,CN=Users", "emailid": "",  "userAvatar": "https://10.1.9.115:8884/csa/thumbnails/dev.jpg", "memberOf": "CN=ApplicationDeveloper,CN=ARA Group",  "role": "Application Developer", "type": "user" }, { "cn": "appdev1",  "dn": "CN=appdev1, CN=Users", "emailid": "",  "userAvatar":"", "memberOf": "CN=ApplicationDeveloper",  "role": "Application Developer", "type": "user" } ]  }