Access Control (REST) API - Teams
This section includes REST APIs for working with Access Control Team tasks.
Get All Teams - GET /Teams
This section includes REST APIs for retrieving details of all teams.
Get All Teams - GET /Teams (v1.5)
Gets details of all teams.
Usage:
GET /Teams and get details of all teams
PUT /Teams/{id} and update team details
URL
/cxrestapi/auth/Teams
Method:
GET
Media Type (header):
Authorization: Bearer <access token value>
Accept: application/json;v=1.0
Parameters
None
Success Response:
Code: 200 Success
Error Response:
Code: 401 Unauthorized
Code: 403 Forbidden
Sample Response:
[ { "id": 1, "name": "CxServer", "fullName": "/CxServer", "parentId": 0 }, { "id": 2, "name": "Reviewers", "fullName": "/CxServer/Reviewers", "parentId": 1 } ]
Notes:
Retrieves details of all teams. If the request fails, it returns an error response.
Get All Teams - GET /Teams (v2.0 and up)
Gets details of all teams.
Usage:
GET /Teams and get details of all teams
PUT /Teams/{id} and update team details
URL
/cxrestapi/auth/Teams
Method:
GET
Media Type (header):
Authorization: Bearer <access token value>
Accept: application/json;v=1.0
Parameters
None
Success Response:
Code: 200 Success
Error Response:
Code: 401 Unauthorized
Code: 403 Forbidden
Sample Response:
[ { "id": 1, "name": "CxServer", "fullName": "CxServer", "parentId": 0 }, { "id": 2, "name": "Reviewers", "fullName": "CxServer/Reviewers", "parentId": 1 }
Notes:
Retrieves details of all teams. If the request fails, it returns an error response.
Create New Team - POST /Teams
Create a new team.
Notice
The ‘Manage Users’ permission is required to execute this API.
Usage:
POST /Teams and create a new team
GET /Teams and get details of all teams
URL
/cxrestapi/auth/Teams
Method:
POST
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
Parameters
createTeamModel=[body]: Specifies the team details
name=[string] – Team name
parentId=[integer] – Team parent Id
Success Response:
Code: 201 Success
Error Response:
Code: 400 Bad Request
Code: 401 Unauthorized
Code: 403 Forbidden
Sample Response:
no content
Notes:
Returns the location of the created team in the response header. If the request fails, it returns an error response.
Get Team by Id - GET /Teams/{id}
Get details of a team according to team Id.
Usage:
GET /Teams/{id} and get details of a team
PUT /Teams/{id} and update team details
URL
/cxrestapi/auth/Teams/{id}
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: 201 Success
Error Response:
Code: 400 Bad Request
Code: 401 Unauthorized
Code: 403 Forbidden
Code: 404 Not Found
Sample Response:
{ "id": 2, "name": "Reviewers", "fullName": "/CxServer/Reviewers", "parentId": 1 }
Notes:
Retrieves team details according to the specified team Id. If the request fails, it returns an error response.
Send Documentation Feedback - If you have comments about this documentation, you can contact the documentation team by sending your feedback to us. We appreciate your feedback!
Update a Team - PUT /Teams/{id}
Update team details according to team Id. When changing a name of the root team, you should refresh the access token in order to continue working.
Notice
The ‘Manage Users’ permission is required to execute this API.
Usage:
GET /Teams/{id} and get details of a team
PUT /Teams/{id} and update team details
URL
/cxrestapi/auth/Teams/{id}
Method:
PUT
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
Parameters
Required:
id=[integer] – Unique Id of the Team
updateTeamModel=[body]: Specifies the team details
name=[string] – Team name
parentId=[integer] - Team parent Id
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 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.
Delete a Team – DELETE /Teams/{id}
Delete a team according to Team Id.
Notice
The ‘Manage Users’ permission is required to execute this API.
Usage:
GET /Teams and get details of all teams
DELETE /Teams/{id} and delete a team
URL
/cxrestapi/auth/Teams/{id}
Method:
DELETE
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
Parameters
Required:
id=[integer] – Unique Id of the Team
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:
Delete a team according to the Team Id. Once the request is successful, it does not return any content. If the request fails, it returns an error response.