> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-commands-guide/asset-commands.md).

# Asset Commands

* [getAssets](#getassets)
* [getAssetGroup](#getassetgroup)
* [createAssetGroup](#createassetgroup)
* [deleteAssetGroup](#deleteassetgroup)
* [setAssetGroup](#setassetgroup)
* [getAssetSchema](#getassetschema)
* [getAssetSchemaFieldOptions](#getassetschemafieldoptions)

#### getAssets

***

Retrieves assets from the Cortex platform using optional filter criteria. If no filter arguments are supplied, the command returns a list of assets.

<details>

<summary>Arguments</summary>

| Argument Name                 | Description                                                                                                                                                                                                                                                                                   | Required |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| page\_size                    | The number of assets to return per page. Default is 100.                                                                                                                                                                                                                                      | Optional |
| page\_number                  | The page number for the assets to return for pagination. Default is 0.                                                                                                                                                                                                                        | Optional |
| asset\_names                  | A comma-separated list of asset names to search for.                                                                                                                                                                                                                                          | Optional |
| asset\_types                  | A comma-separated list of asset types to search for.                                                                                                                                                                                                                                          | Optional |
| asset\_tags                   | A JSON encoded string representing a list of tag:value pairs to search for.                                                                                                                                                                                                                   | Optional |
| asset\_ids                    | A comma-separated list of asset IDs to search for.                                                                                                                                                                                                                                            | Optional |
| asset\_providers              | A comma-separated list of asset providers to search for.                                                                                                                                                                                                                                      | Optional |
| asset\_realms                 | A comma-separated list of asset realms to search for.                                                                                                                                                                                                                                         | Optional |
| asset\_groups                 | A JSON encoded string representing a list of asset group names to search for.                                                                                                                                                                                                                 | Optional |
| asset\_categories             | A comma-separated list of asset categories to search for.                                                                                                                                                                                                                                     | Optional |
| asset\_classes                | A comma-separated list of asset classes to search for. Possible values are: AI, API, Application, Code, Compute, Data, Device, External Surface, Identity, Management, Network, Organization, Other, Security Services.                                                                       | Optional |
| software\_package\_versions   | A comma-separated list of software package versions to search for.                                                                                                                                                                                                                            | Optional |
| kubernetes\_cluster\_versions | A comma-separated list of Kubernetes cluster versions to search for.                                                                                                                                                                                                                          | Optional |
| filter\_object                | A JSON string representing a raw filter object. If provided, this overrides all other filter arguments (asset\_names, asset\_types, asset\_tags, asset\_ids, asset\_providers, asset\_realms, asset\_categories, asset\_classes, software\_package\_versions, kubernetes\_cluster\_versions). | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.Asset.name** *string*

The name of the asset.

**Core.Asset.provider** *string*

The asset provider.

**Core.Asset.id** *string*

The ID of the asset.

**Core.Asset.external\_provider\_id** *string*

The external provider ID of the asset.

**Core.Asset.first\_observed** *number*

The first time the asset was observed.

**Core.Asset.realm** *string*

The realm of the asset.

**Core.Asset.last\_observed** *number*

The last time the asset was observed.

**Core.Asset.strong\_id** *string*

The strong ID of the asset.

</details>

#### getAssetGroup

***

Searches for asset groups from the Cortex platform using one or more filter criteria.

<details>

<summary>Arguments</summary>

| Argument Name  | Description                                                                                                                                                                                                              | Required |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| names          | A comma-separated list of asset group names to filter by.                                                                                                                                                                | Optional |
| type           | Filter by asset group type.                                                                                                                                                                                              | Optional |
| descriptions   | A comma-separated list of descriptions to filter by.                                                                                                                                                                     | Optional |
| ids            | A comma-separated list of asset group IDs to filter by.                                                                                                                                                                  | Optional |
| sort\_order    | The sort order for results. Possible values: ASC, DESC. Possible values are: ASC, DESC. Default is DESC.                                                                                                                 | Optional |
| created\_by    | A comma-separated list of creator names to filter by.                                                                                                                                                                    | Optional |
| modified\_by   | A comma-separated list of modifier names to filter by.                                                                                                                                                                   | Optional |
| limit          | Maximum number of results to return. Default is 50.                                                                                                                                                                      | Optional |
| filter\_object | A JSON string representing a raw filter object. If provided, this overrides all other filter arguments (names, type, descriptions, ids, created\_by, modified\_by). Cannot be used together with other filter arguments. | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.AssetGroups.id** *number*

The unique identifier of the asset group.

**Core.AssetGroups.name** *string*

The name of the asset group.

**Core.AssetGroups.type** *string*

The type of the asset group.

**Core.AssetGroups.created\_by** *string*

The user who created the asset group.

**Core.AssetGroups.creation\_time** *number*

The creation timestamp of the asset group.

**Core.AssetGroups.created\_by\_email** *string*

The email of the user who created the asset group.

**Core.AssetGroups.last\_update\_time** *number*

The last update timestamp of the asset group.

**Core.AssetGroups.modified\_by** *string*

The user who last modified the asset group.

**Core.AssetGroups.modified\_by\_email** *string*

The email of the user who last modified the asset group.

**Core.AssetGroups.description** *string*

The description of the asset group.

**Core.AssetGroups.filter** *unknown*

The filter conditions of the asset group.

**Core.AssetGroups.membership\_predicate** *unknown*

The membership predicate defining asset group membership criteria.

**Core.AssetGroups.is\_used\_by\_sbac** *boolean*

Whether the asset group is used by SBAC.

</details>

#### createAssetGroup

***

Creates an asset group, either from a fixed list of specific assets or from assets that automatically match a filter you define.

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                                                                                                                                                                                                                                        | Required |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| group\_name        | The name of the asset group.                                                                                                                                                                                                                                                                                                                                                                       | Required |
| group\_type        | The type of the asset group. Possible values are: Static, Dynamic.                                                                                                                                                                                                                                                                                                                                 | Required |
| group\_description | The description of the asset group.                                                                                                                                                                                                                                                                                                                                                                | Optional |
| membership\_json   | Define the filter conditions for selecting which assets to be included in the Asset Group. Required for Dynamic groups. For Static groups, either this or asset\_ids must be provided. The JSON schema must match the format required in the API documentation: <https://cortex-docs.paloaltonetworks.com/xsiam-api/cortex-platform/asset-groups#post-public_api-v1-asset-groups-update-group_id>. | Optional |
| asset\_ids         | A comma-separated list of asset IDs to add to the static group. Only valid for Static groups. If provided alongside membership\_json, asset\_ids takes precedence.                                                                                                                                                                                                                                 | Optional |

</details>

**Outputs**

There are no outputs for this command.

#### deleteAssetGroup

***

Deletes an asset group. This does not delete the assets themselves, only the group that references them.

<details>

<summary>Arguments</summary>

| Argument Name | Description                          | Required |
| ------------- | ------------------------------------ | -------- |
| group\_id     | The ID of the asset group to delete. | Required |

</details>

**Outputs**

There are no outputs for this command.

#### setAssetGroup

***

Updates an existing asset group's name, description, or membership filter.

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                                                                                                                                                  | Required |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| group\_id          | The ID of the asset group to update.                                                                                                                                                                                                                                                                         | Required |
| group\_name        | The name of the asset group.                                                                                                                                                                                                                                                                                 | Required |
| group\_type        | The type of the asset group. Possible values are: Static, Dynamic.                                                                                                                                                                                                                                           | Required |
| group\_description | The description of the asset group.                                                                                                                                                                                                                                                                          | Optional |
| membership\_json   | Define the filter conditions for selecting which assets to be included in a dynamic Asset Group. The JSON schema must match the format required in the API documentation: <https://cortex-docs.paloaltonetworks.com/xsiam-api/cortex-platform/asset-groups#post-public_api-v1-asset-groups-update-group_id>. | Required |

</details>

**Outputs**

There are no outputs for this command.

#### getAssetSchema

***

Gets the schema of the asset inventory.

**Arguments**

There are no input arguments for this command.

<details>

<summary>Outputs</summary>

**Core.AssetSchema.field\_pretty\_name** *string*

The human-readable name of the asset schema field.

**Core.AssetSchema.field\_name** *string*

The internal name of the asset schema field.

**Core.AssetSchema.data\_type** *string*

The data type of the asset schema field.

</details>

#### getAssetSchemaFieldOptions

***

Gets the possible values of a specified field in the asset schema for fields of type 'ENUM'

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                                                                                  | Required |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------- |
| field\_name   | The name of the field to get options for. You can use getAssetSchema to retrieve the schema. The field must be of type ENUM. | Required |

</details>

<details>

<summary>Outputs</summary>

**Core.AssetSchemaOptions.pretty\_name** *string*

The human-readable label for the enum option.

**Core.AssetSchemaOptions.name** *string*

The internal name of the enum option.

**Core.AssetSchemaOptions.field** *string*

The schema field this option belongs to.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-commands-guide/asset-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
