Access Control (REST) API - Team Members
This section includes REST APIs for working with Access Control Team Member tasks.
Get Members by Team Id - GET /Teams/{id}/Users
Get details of all team members according to team Id.
Usage:
GET / Teams/{id}/Users and get details of all team members
PUT /Teams/{teamId}/Users and update team member details
URL
/cxrestapi/auth/Teams/{id}/Users
Method:
GET
Media Type (header):
Authorization: Bearer <access token value>
Accept: application/json;v=1.0
Parameters
Required:
id=[integer] – Unique Id of the Team
Success Response:
Code: 200 Success
Error Response:
Code: 401 Unauthorized
Code: 403 Forbidden
Code: 404 Not Found
Sample Response:
[ { "id": 1, "userName": "check.admin", "lastLoginDate": "2018-07-17T07:32:05.3405064Z", "roleIds": [ 1 ], "teamIds": [ 1 ], "authenticationProviderId": 1, "firstName": "James", "lastName": "Smith", "email": "admin@check.org", "phoneNumber": null, "cellPhoneNumber": null, "jobTitle": null, "other": null, "country": null, "active": true, "expirationDate": "2021-07-15T08:02:08.5414508Z", "allowedIpList": [], "localeId": 1 } ]
Notes:
Retrieves team member details according to the specified team Id. If the request fails, it returns an error response.
Update Members by Team Id - PUT /Teams/{teamId}/Users
Update team member details according to team Id.
Notice
The ‘Manage Users’ permission is required to execute this API.
Usage:
GET /Teams/{id}/Users and get details of all team members
PUT /Teams/{teamId}/Users and update team member details
URL
/cxrestapi/auth/Teams/{teamId}/Users
Method:
PUT
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
Parameters
Required:
teamId=[integer] - Unique Id of the Team
updateTeamMembersModel=[body]: Specifies the team members details
userIds=[integer] – Id(s) of the User(s)
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 the team member details according to the defined parameters. Once the request is successful, it does not return any content. If the request fails, it returns an error response.
Add a User to a Team – POST /Teams/{teamId}/Users/{userId}
Add user to team according to team Id and user Id.
Notice
The ‘Manage Users’ permission is required to execute this API.
Usage:
GET /Teams/{id}/Users and get details of all team members
POST /Teams/{teamId}/Users/{userId} and add user to team
URL
/cxrestapi/auth/Teams/{teamId}/Users/{userId}
Method:
POST
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
Parameters
Required:
teamId=[integer] – Unique Id of the Team
userId=[integer] – Unique Id of the User
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:
Adds a user to a team according to the defined parameters. Once the request is successful, it does not return any content. If the request fails, it returns an error response.
Delete a Member From a Team – DELETE /Teams/{teamId}/users/{userId}
Delete a user from a team according to team Id and user Id.
Notice
The ‘Manage Users’ permission is required to execute this API.
Usage:
GET /Teams/{id}/Users and get details of all team members
DELETE /Teams/{teamId}/users/{userId} and delete a member from a team
URL
/cxrestapi/auth/Teams/{teamId}/users/{userId}
Method:
DELETE
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
Parameters
Required:
teamId=[integer] – Unique Id of the Team
userId=[integer] – Unique Id of the User
Success Response:
Code: 204 Success
Error Response:
Code: 400 Bad Request
Code: 401 Unauthorized
Code: 403 Forbidden
Sample Response:
no content
Notes:
Delete a user from a team according to the defined parameters. Once the request is successful, it does not return any content. If the request fails, it returns an error response.