Get Roles

Cortex XDR REST API

post /public_api/v1/rbac/get_roles

Retrieve information about one or more roles created in your environment.

Required license: Cortex XDR Pro per Endpoint, Cortex XDR Pro, or Cortex XDR Pro per GB

CURL
curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ "https://api-yourfqdn/public_api/v1/rbac/get_roles" \ -d '{ "request_data" : { "role_names" : [ "role_names", "role_names" ] } }'
Request
Body
optional
Example: {"request_data":{"role_names":["Role1","Role2"]}}
request_data
required
A dictionary containing the API request fields.
role_names
optional
Array of strings
List of one or more role names in your environment for which you want detailed information.
Responses

OK

Body
reply
optional
Array
JSON object containing the query result.
pretty_name
optional
String
Name of the role as it appears in the Management Console.
permissions
optional
Array of strings
List of permissions associated with this role.
insert_time
optional
Integer
Timestamp of when the Role was created.
update_time
optional
Integer
Timestamp of when the Role was last updated.
created_by
optional
String
Email of the user who created the Role.
description
optional
String
Description of the Role, if available.
groups
optional
Array of strings
Group names associated with the Role.
users
optional
Array of strings
Email address of users associated with the Role.

Bad Request. Got an invalid JSON.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Unauthorized access. User does not have the required license type to run this API.equired

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Internal server error. A unified status for API communication type errors.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.