You can use Zephyr Enterprise REST API to import and synchronize LDAP or Crowd groups programmatically.
Get a list of groups from LDAP or Crowd
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 example, contains or begins with).
pagesize - explain the max and default size (waiting for a message from Govind)
Both query parameters are optional.
Import one or more groups from LDAP or Crowd
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 a group
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. |