Get Role by Id - GET /Roles/{id}



Get details of a role.

The ‘Manage Roles’ or ‘Manage Users’ permission is required to execute this API.

Usage:

  1. GET /Roles/{id} and get details of a role
  2. PUT /Roles/{id} and update role details

URL

/cxrestapi/auth/Roles/{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 Role

Success Response:

Code: 201 Success

Error Response:

Code: 400 Bad Request
Code: 401 Unauthorized
Code: 403 Forbidden
Code: 404 Not Found

Sample Response:

{
  "id": 5,
  "isSystemRole": true,
  "name": "SAST Reviewer",
  "description": "This role grants \"read only\" permissions to view scan results and generate reports",
  "permissionIds": [
    14,
    15,
    16,
    18,
    23
  ]
}

Notes:

Retrieves role details according to the role 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 usWe appreciate your feedback!