Get Business Units

Cortex Xpanse REST API

post /public_api/v1/assets/get_business_units

Fetches business unit information for all or a subset of the business units in your Cortex Xpanse tenant. The results are sorted by business_unit_name.

CURL
curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" -H "authorization: {{api_key}}" -H "x-xdr-auth-id: {{api_key_id}}" \ "https://api-}/public_api/v1/assets/get_business_units" \ -d '{ "request_data" : { "next_page_token" : "next_page_token", "filters" : [ { "field" : "business_unit_id", "value" : "value", "operator" : "contains" }, { "field" : "business_unit_id", "value" : "value", "operator" : "contains" } ], "use_page_token" : true } }'
Request headers
authorization
required
String
api-key
Example: {{api_key}}
x-xdr-auth-id
required
String
api-key-id
Example: {{api_key_id}}
Request
Body
optional
Example: {"request_data":{"filters":[{"field":"business_unit_id","operator":"contains","value":"string"}],"use_page_token":true,"next_page_token":"string"}}
request_data
required
A dictionary containing the API request fields. An empty dictionary returns all results.
filters
optional
Array
An array of filter fields.
field
optional
String (Enum)
Identifies the business unit field the filter is matching.
Allowed values:
business_unit_id
business_unit_name
parent_id
operator
optional
String (Enum)
Identifies the comparison operator you want to use for this filter. All operators listed can be used with all filter fields.
Allowed values:
contains
eq
in
neq
not_contains
value
optional
String

Value depends on the filter field used.

  • business_unit_id: string
  • business_unit_name: string
  • parent_id: string
use_page_token
optional
Boolean
Use "use_page_token":true in the initial request to paginate the response data.
next_page_token
optional
String
If "use_page_token":true was included in the initial request, the response for that request will include a page token.
Use "next_page_token":"string" to pass that page token into the next request to paginate the next set of data.'
Responses

OK

Body
reply
optional
total_count
optional
Integer
result_count
optional
Integer
business_units
optional
Array
business_unit_id
optional
String
business_unit_name
optional
String
parent_id
optional
String

Bad Request. Got an invalid JSON.

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

Body
reply
required
Object
The query results upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.

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

Body
reply
required
Object
The query results upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
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
reply
required
Object
The query results upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.

Unprocessable Entity

Body
code
optional
Integer
Error code
status
optional
String
Error name
message
optional
String
Error message
errors
optional
Object
Errors

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

Body
reply
required
Object
The query results upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.