Access Control (REST) API - Permissions
This section includes REST APIs for working with Access Control Permission tasks.
Get All Permissions - GET /Permissions
Get details of all permissions.
Notice
The ‘Manage Roles’ or ‘Manage Users’ permission is required to execute this API.
Usage:
GET /Permissions and get details of all permissions
GET /Permissions/{id} and get details of a permission
URL
/cxrestapi/auth/Permissions
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, "serviceProviderId": 1, "name": "manage-users", "category": null }, { "id": 2, "serviceProviderId": 1, "name": "manage-authentication-providers", "category": null }, { "id": 3, "serviceProviderId": 1, "name": "manage-clients", "category": null }, { "id": 4, "serviceProviderId": 1, "name": "manage-system-settings", "category": null } ]
Notes:
Retrieves details of all permissions. Service Provider Id (serviceProviderId) is used in the Service Provider API. If the request fails, it returns an error response.
Get Permissions by Id - GET /Permissions/{id}
Get details of a specified permission.
Notice
The ‘Manage Roles’ or ‘Manage Users’ permission is required to execute this API.
Usage:
GET /Permissions and get details of all permissions
GET /Permissions/{id} and get details of a permission
URL
/cxrestapi/auth/Permissions/{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 Permission
Success Response:
Code: 201 Success
Error Response:
Code: 400 Bad Request
Code: 401 Unauthorized
Code: 403 Forbidden
Code: 404 Not Found
Sample Response:
{ "id": 4, "serviceProviderId": 1, "name": "manage-system-settings", "category": null }
Notes:
Retrieves permission details according to the permission Id. If the request fails, it returns an error response.