You If LDAP or Crowd is set up for authentication in Zephyr, you can use Zephyr Enterprise REST API to programmatically import and synchronize LDAP or Crowd groups programmaticallyto Zephyr and synchronize them.
Get a list of groups
...
Request URL
Code Block | ||
---|---|---|
| ||
GET http(s)://{ZEPHYR-SERVER}/flex/services/rest/v3/externalGroup/search?name=SEARCH_STRING&pagesize=100 |
Request parameters
name - a substring (for examplethat is, “contains” or “begins with”).
pagesize - explain the max and default size (waiting for a message from Govind)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
Code Block |
---|
POST http(s)://{ZEPHYR-SERVER}/flex/services/rest/v3/externalGroup/importGroupsAndUsers |
Content-Type: application/json
Sample Request
{"names": ["GroupName1", "GroupName2", ...]}
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. Below is a sample response obtained when searching for an execution:
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. |
...