If LDAP or Crowd is set up for authentication in Zephyr, you can use Zephyr Enterprise REST API to programmatically import LDAP or Crowd groups to Zephyr and synchronize them.
Get a list of groups
Request URL
GET http(s)://{ZEPHYR-SERVER}/flex/services/rest/v3/externalGroup/search?name=SEARCH_STRING&pagesize=100
Request parameters
name - a substring (that is, “contains” or “begins with”).
pagesize - the number of groups to be fetched. The default number is 100; the maximum number is 499.
Both query parameters are optional.
Import one or more groups
Request URL
POST http(s)://{ZEPHYR-SERVER}/flex/services/rest/v3/externalGroup/importGroupsAndUsers
Content-Type: application/json
Sample Request
{"names": ["GroupName1", "GroupName2", ...]}
LDAP groups must be specified by their distinguished name (DN). For example: CN=Automation_QA, OU=QA
.
Synchronize one or more groups
Request URL
PUT http(s)://{ZEPHYR-SERVER}/flex/services/rest/v3/externalGroup/importGroupsAndUsers
Content-Type: application/json
Sample Request
{"names": ["GroupName1", "GroupName2", ...]}
Authentication
You can authenticate your requests by using one of the methods described in the Zephyr REST API topic.
Response
On success, the operations return status code 200 and a JSON object containing metadata and found results. The structure of these results varies depending on the sought-for entities, items and so on.
Response codes
HTTP Status Code | Description |
---|---|
200 | The request completed successfully. |
400 | Bad request. |
401 | The authentication token is missing. |
403 | The user has no permissions to perform this operation. |
500 | Unknown internal error. |