Asset Groups
APIs for managing asset groups
By grouping assets based on shared attributes, you can address them collectively. Asset groups enable more efficient bulk actions and simplifies both filtering and scoping within the inventory and across the platform.
Get all or filtered asset groups.
Filters can contain nested AND/OR groups, to any depth. Each request returns up to 1,000 Asset Groups.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
{api_key}
{api_key_id}
Ok
Bad Request. Invalid input, for example an unknown or non-filterable field, an unsupported operator or ENUM value, or a requested range larger than 1,000 results.
Unauthorized
Internal Server Error. Also returned when a required parameter is missing.
POST /public_api/v1/asset-groups HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 224
{
"request_data": {
"filters": {
"AND": [
{
"SEARCH_FIELD": "XDM.ASSET_GROUP.TYPE",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "Dynamic"
}
]
},
"sort": [
{
"FIELD": "XDM.ASSET_GROUP.LAST_UPDATE_TIME",
"ORDER": "DESC"
}
],
"search_from": 1,
"search_to": 1000
}
}{
"reply": {
"data": [
{}
],
"metadata": {
"filter_count": 1,
"total_count": 1000
}
}
}Create a dynamic or static Asset Group.
Dynamic: Define the filter conditions in
membership_predicate. Any asset that meets the conditions is included in the group.Static: Specify the individual assets in
membership_predicate, for example by filtering onxdm.asset.id.
group_name, group_type, and membership_predicate are required. The group name must be unique. membership_predicate can contain nested AND/OR groups, to any depth.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
{api_key}
{api_key_id}
Ok
Bad Request. Invalid input, for example an unknown or non-filterable field, an unsupported operator or ENUM value, or a group name that already exists.
Unauthorized
Conflict. The Asset Group could not be saved, for example because the filter is invalid.
Internal Server Error. Also returned when a required parameter is missing.
POST /public_api/v1/asset-groups/create HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 1099
{
"request_data": {
"asset_group": {
"group_name": "<group_name>",
"group_type": "Dynamic",
"group_description": "",
"membership_predicate": {
"OR": [
{
"AND": [
{
"SEARCH_FIELD": "xdm.organization.name",
"SEARCH_TYPE": "CONTAINS",
"SEARCH_VALUE": "<your_org_name>"
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "xdm.asset.realm",
"SEARCH_TYPE": "WILDCARD",
"SEARCH_VALUE": "<your_account_id>"
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "xdm.business_application.names",
"SEARCH_TYPE": "ARRAY_CONTAINS",
"SEARCH_VALUE": "<your_app_name>"
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "xdm.asset.tags",
"SEARCH_TYPE": "JSON_WILDCARD",
"SEARCH_VALUE": {
"key": "owner",
"value": "<owner_name>"
}
}
]
},
{
"AND": [
{
"OR": [
{
"SEARCH_FIELD": "xdm.asset.type.class",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "Compute"
},
{
"SEARCH_FIELD": "xdm.asset.type.class",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "Data"
}
]
}
]
},
{
"AND": [
{
"OR": [
{
"SEARCH_FIELD": "xdm.asset.cloud.region",
"SEARCH_TYPE": "WILDCARD",
"SEARCH_VALUE": "us-east-1"
},
{
"SEARCH_FIELD": "xdm.asset.cloud.region",
"SEARCH_TYPE": "WILDCARD",
"SEARCH_VALUE": "eu-west-1"
}
]
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "xdm.organization.id",
"SEARCH_TYPE": "IS_EMPTY",
"SEARCH_VALUE": "<No Value>"
}
]
}
]
}
}
}
}{
"reply": {
"data": {
"success": true,
"asset_group_id": 1
}
}
}Update the Asset Group specified by Asset Group ID.
The request replaces the Asset Group definition. group_name, group_type, and membership_predicate are required. The group name must be unique.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
Asset Group ID
{api_key}
{api_key_id}
Ok
Bad Request. Invalid input, for example an unknown or non-filterable field, an unsupported operator or ENUM value, or a group name that already exists.
Unauthorized
Conflict. The Asset Group could not be saved, for example because the filter is invalid.
Internal Server Error. Also returned when a required parameter is missing.
POST /public_api/v1/asset-groups/update/{group_id} HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 244
{
"request_data": {
"asset_group": {
"group_name": "<group_name>",
"group_type": "Dynamic",
"group_description": "<group_description>",
"membership_predicate": {
"AND": [
{
"SEARCH_FIELD": "xdm.asset.type.class",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "Compute"
}
]
}
}
}
}{
"reply": {
"data": {
"success": true
}
}
}Delete the Asset Group specified by Asset Group ID.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
Asset Group ID
{api_key}
{api_key_id}
Ok
Unauthorized
Conflict. The Asset Group could not be deleted.
Internal Server Error, Invalid Input
POST /public_api/v1/asset-groups/delete/{group_id} HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Accept: */*
{
"reply": {
"data": {
"success": true
}
}
}Last updated
Was this helpful?
