Get User Groups

Cortex XDR REST API

post /public_api/v1/rbac/get_user_group

Retrieve a list of the current user emails associated with one or more user groups in your environment.

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

Body parameters
request_dataObject

A dictionary containing the API request fields.

group_namesArray[string]

List of one or more user group names for which you want the associated users.

REQUEST BODY
{ "request_data": { "group_names": [ "Group1", "Group2" ] } }
CURL
curl -X 'POST'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
'https://api-yourfqdn/public_api/v1/rbac/get_user_group'
-d ''
Responses

OK

Body
replyArray

JSON object containing the query result.

group_nameString

Name of the User Group.

descriptionObject

Description of the User Group, if available.

pretty_nameString

Name of the User Group as it appears in the Management Console.

insert_timeInteger

Timestamp of when the User Group was created.

update_timeInteger

Timestamp of when the User Group was last updated.

user_emailArray[string]

List of email addresses belonging to the users associated with the User Group.

sourceString

Type of User Group.

RESPONSE
{ "reply": [ { "group_name": "Group1", "description": null, "pretty_name": "Investigator", "insert_time": 1661170832341, "update_time": 1661171650679, "user_email": [ "user1@acme.com", "user2@pacme.com", "user3@acme.com", "user4@acme.com", "user5@acme.com" ], "source": "Custom" }, { "group_name": "Group2", "description": null, "pretty_name": "Instance Administrator", "insert_time": 1660830450590, "update_time": 1661171631589, "user_email": [ "user1@acme.com", "user2@acme.com", "user3@acme.com", "user4@acme.com" ], "source": "Custom" } ] }

Bad Request. Got an invalid JSON.

Body
err_codeString

HTTP response code.

err_msgString

Error message.

Example:"{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}"
err_extraString

Additional information describing the error.

RESPONSE
{ "err_code": "err_code_example", "err_msg": "{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}", "err_extra": "err_extra_example" }

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

Body
err_codeString

HTTP response code.

err_msgString

Error message.

Example:"{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}"
err_extraString

Additional information describing the error.

RESPONSE
{ "err_code": "err_code_example", "err_msg": "{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}", "err_extra": "err_extra_example" }

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

Body
err_codeString

HTTP response code.

err_msgString

Error message.

Example:"{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}"
err_extraString

Additional information describing the error.

RESPONSE
{ "err_code": "err_code_example", "err_msg": "{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}", "err_extra": "err_extra_example" }

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

Body
err_codeString

HTTP response code.

err_msgString

Error message.

Example:"{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}"
err_extraString

Additional information describing the error.

RESPONSE
{ "err_code": "err_code_example", "err_msg": "{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}", "err_extra": "err_extra_example" }

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

Body
err_codeString

HTTP response code.

err_msgString

Error message.

Example:"{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}"
err_extraString

Additional information describing the error.

RESPONSE
{ "err_code": "err_code_example", "err_msg": "{\"line\": 1, \"column\": 19, \"message\": \"no viable alternative at input '|alter2'\"}", "err_extra": "err_extra_example" }