> 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/endpoint-commands.md).

# Endpoint Commands

* endpoint
* getEndpoints
* deleteEndpoints
* isolateEndpoint
* unisolateEndpoint
* endpointScan
* abortEndpointScan
* getEndpointPolicy
* getEndpointUpdateVersion
* getEndpointDeviceControlViolations
* addEndpointTag
* setEndpointAlias
* setEndpointVersion
* blockIPs
* removeEndpointTag
* retrieveFiles
* terminateCausality
* terminateProcess

#### endpoint

***

Returns information about an endpoint.

<details>

<summary>Arguments</summary>

| Argument Name | Description              | Required |
| ------------- | ------------------------ | -------- |
| id            | The endpoint ID.         | Optional |
| ip            | The endpoint IP address. | Optional |
| hostname      | The endpoint hostname.   | Optional |

</details>

<details>

<summary>Outputs</summary>

**Endpoint.Hostname** *string*

The hostname of the endpoint.

**Endpoint.OS** *string*

The endpoint's operation system.

**Endpoint.IPAddress** *string*

The IP address of the endpoint.

**Endpoint.ID** *string*

The endpoint's ID.

**Endpoint.Status** *string*

The endpoint's status.

**Endpoint.IsIsolated** *string*

The endpoint's isolation status.

**Endpoint.MACAddress** *string*

The endpoint's MAC address.

**Endpoint.Vendor** *string*

The integration name of the endpoint vendor.

**Endpoint.Domain** *string*

The domain of the endpoint.

</details>

#### getEndpoints

***

Gets a list of endpoints, according to the passed filters. If there are no filters, all endpoints are returned. Filtering by multiple fields will be concatenated using AND condition. Maximum result set size is 100. Offset is the zero-based number of endpoint from the start of the result set (start by counting from 0).

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                           | Required |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| endpoint\_id\_list | A comma-separated list of endpoint IDs.                                                                                                                                               | Optional |
| dist\_name         | A comma-separated list of distribution package names or installation package names.                                                                                                   | Optional |
| ip\_list           | A comma-separated list of private IP addresses. Example: 10.1.1.1,192.168.1.1.                                                                                                        | Optional |
| public\_ip\_list   | A comma-separated list of public IP addresses that correlate to the last IPv4 address from which the Cortex XDR agent connected (know as 'Last Origin IP'). Example: 8.8.8.8,1.1.1.1. | Optional |
| group\_name        | A comma-separated list of group names to which the agent belongs.                                                                                                                     | Optional |
| platform           | The endpoint platform. Valid values are: "windows", "linux", "macos", or "android". Possible values are: windows, linux, macos, android.                                              | Optional |
| alias\_name        | A comma-separated list of alias names.                                                                                                                                                | Optional |
| isolate            | Specifies whether the endpoint was isolated or unisolated. Possible values are: isolated, unisolated.                                                                                 | Optional |
| hostname           | A comma-separated list of endpoint hostnames.                                                                                                                                         | Optional |
| first\_seen\_gte   | All the agents that were first seen after the first\_seen\_gte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).         | Optional |
| first\_seen\_lte   | All the agents that were first seen before the first\_seen\_lte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).        | Optional |
| last\_seen\_gte    | All the agents that were last seen before the last\_seen\_gte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).          | Optional |
| last\_seen\_lte    | All the agents that were last seen before the last\_seen\_lte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).          | Optional |
| page               | Page number for pagination. The default is 0 (the first page). Default is 0.                                                                                                          | Optional |
| limit              | Maximum number of endpoints to return per page. The default and maximum is 30. Default is 30.                                                                                         | Optional |
| sort\_by           | Specifies whether to sort endpoints by the first time or last time they were seen. Can be "first\_seen" or "last\_seen". Possible values are: first\_seen, last\_seen.                | Optional |
| sort\_order        | The order by which to sort results. Can be "asc" (ascending) or "desc" (descending). Default set to asc. Possible values are: asc, desc. Default is asc.                              | Optional |
| status             | A comma-separated list of endpoints statuses to filter. Possible values are: connected, lost, disconnected, uninstalled.                                                              | Optional |
| username           | A comma-separated list of usernames to query for.                                                                                                                                     | Optional |
| all\_results       | Whether to return all endpoints. If true, will override the 'limit' and 'page' arguments. Possible values are: false, true. Default is false.                                         | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.Endpoint.endpoint\_id** *string*

The endpoint ID.

**Core.Endpoint.endpoint\_name** *string*

The endpoint name.

**Core.Endpoint.host\_name** *string*

The hostname of the endpoint.

**Core.Endpoint.endpoint\_type** *string*

The endpoint type.

**Core.Endpoint.endpoint\_status** *string*

The status of the endpoint.

**Core.Endpoint.os\_type** *string*

The endpoint OS type.

**Core.Endpoint.os\_version** *string*

The version of the operating system.

**Core.Endpoint.ip** *string*

A list of IP addresses.

**Core.Endpoint.ipv6** *string*

A list of IPv6 addresses associated with the endpoint.

**Core.Endpoint.public\_ip** *string*

The public IP address of the endpoint.

**Core.Endpoint.users** *string*

A list of users.

**Core.Endpoint.domain** *string*

The endpoint domain.

**Core.Endpoint.alias** *string*

The endpoint's aliases.

**Core.Endpoint.first\_seen** *number*

First seen date/time in Epoch (milliseconds).

**Core.Endpoint.last\_seen** *number*

Last seen date/time in Epoch (milliseconds).

**Core.Endpoint.content\_version** *string*

Content version.

**Core.Endpoint.installation\_package** *string*

Installation package.

**Core.Endpoint.active\_directory** *string*

Active directory.

**Core.Endpoint.install\_date** *number*

Install date in Epoch (milliseconds).

**Core.Endpoint.endpoint\_version** *string*

Endpoint version.

**Core.Endpoint.is\_isolated** *string*

Whether the endpoint is isolated.

**Core.Endpoint.isolated\_date** *number*

The timestamp when the endpoint was isolated.

**Core.Endpoint.group\_name** *string*

The name of the group to which the endpoint belongs.

**Core.Endpoint.operational\_status** *string*

The operational status of the endpoint agent.

**Core.Endpoint.operational\_status\_description** *string*

A description of the operational status.

**Core.Endpoint.operational\_status\_details** *unknown*

Detailed information about the operational status.

**Core.Endpoint.scan\_status** *string*

The status of the last scan.

**Core.Endpoint.content\_release\_timestamp** *number*

The timestamp of the content release.

**Core.Endpoint.last\_content\_update\_time** *number*

The timestamp of the last content update.

**Core.Endpoint.operating\_system** *string*

The full operating system name.

**Core.Endpoint.mac\_address** *string*

A list of MAC addresses for the endpoint.

**Core.Endpoint.assigned\_prevention\_policy** *string*

The prevention policy assigned to the endpoint.

**Core.Endpoint.assigned\_extensions\_policy** *string*

The extensions policy assigned to the endpoint.

**Core.Endpoint.token\_hash** *string*

The token hash for the endpoint.

**Core.Endpoint.tags.server\_tags** *string*

Tags associated with the endpoint.

**Core.Endpoint.tags.endpoint\_tags** *string*

Tags associated with the endpoint.

**Core.Endpoint.cloud\_provider** *string*

The cloud provider (if applicable).

**Core.Endpoint.cloud\_region** *string*

The cloud region (if applicable).

**Core.Endpoint.cloud\_provider\_account\_id** *string*

The cloud provider account ID (if applicable).

**Core.Endpoint.cloud\_instance\_id** *string*

The cloud instance ID (if applicable).

**Core.Endpoint.cloud\_id** *string*

The cloud ID (if applicable).

**Core.Endpoint.content\_status** *string*

The status of the content on the endpoint.

**Endpoint.Hostname** *string*

The hostname of the endpoint.

**Endpoint.OS** *string*

The endpoint's operation system.

**Endpoint.IPAddress** *string*

The IP address of the endpoint.

**Endpoint.ID** *string*

The endpoint's ID.

**Endpoint.Status** *string*

The endpoint's status.

**Endpoint.IsIsolated** *string*

The endpoint's isolation status.

**Endpoint.MACAddress** *string*

The endpoint's MAC address.

**Endpoint.Vendor** *string*

The integration name of the endpoint vendor.

**Endpoint.Domain** *string*

The domain of the endpoint.

**Account.Username** *string*

The username in the relevant system.

**Account.Domain** *string*

The domain of the account.

</details>

#### deleteEndpoints

***

Deletes selected endpoints in the Cortex app. You can delete up to 1000 endpoints. This removes the endpoint record only. It does not uninstall the agent from the device.

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                                                                  | Required |
| ------------- | ------------------------------------------------------------------------------------------------------------ | -------- |
| endpoint\_ids | Comma-separated list of endpoint IDs. You can retrieve the endpoint IDs from the core-get-endpoints command. | Required |

</details>

**Outputs**

There are no outputs for this command.

#### isolateEndpoint

***

Isolates the specified endpoint, blocking all network traffic except its connection to the management console. Use unisolateEndpoint to reverse this action once the threat has been contained.

<details>

<summary>Arguments</summary>

| Argument Name                           | Description                                                                                                                                                    | Required |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| endpoint\_id                            | The endpoint ID to isolate. Retrieve it from the getEndpoints command.                                                                                         | Required |
| case\_id                                | Links the response action to the case that triggered it.                                                                                                       | Optional |
| suppress\_disconnected\_endpoint\_error | Suppress an error when trying to isolate a disconnected endpoint. When set to false, an error is returned. Possible values are: true, false. Default is false. | Optional |
| interval\_in\_seconds                   | Interval in seconds between each poll.                                                                                                                         | Optional |
| timeout\_in\_seconds                    | Polling timeout in seconds.                                                                                                                                    | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.Isolation.endpoint\_id** *string*

The endpoint ID.

</details>

#### unisolateEndpoint

***

Reverses the isolation of an endpoint, restoring its normal network connectivity.

Note: This is a polling command.

<details>

<summary>Arguments</summary>

| Argument Name                           | Description                                                                                                                                                      | Required |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| endpoint\_id                            | The endpoint ID to reverse the isolation. Retrieve it from the getEndpoints command.                                                                             | Optional |
| case\_id                                | Links the response action to the case that triggered it.                                                                                                         | Optional |
| suppress\_disconnected\_endpoint\_error | Suppress an error when trying to unisolate a disconnected endpoint. When set to false, an error is returned. Possible values are: true, false. Default is false. | Optional |
| interval\_in\_seconds                   | Interval in seconds between each poll.                                                                                                                           | Optional |
| timeout\_in\_seconds                    | Polling timeout in seconds.                                                                                                                                      | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.UnIsolation.endpoint\_id** *string*

The endpoint ID.

</details>

#### endpointScan

***

Runs a scan on selected endpoints. To scan all endpoints, use the argument all=true. Scanning all endpoints may affect performance and cause latency.

Note: This is a polling command.

<details>

<summary>Arguments</summary>

| Argument Name         | Description                                                                                                                                                                                                                              | Required |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| case\_id              | Links the response action to the case that triggered it.                                                                                                                                                                                 | Optional |
| endpoint\_ids         | A comma-separated list of endpoint IDs.                                                                                                                                                                                                  | Optional |
| dist\_name            | A comma-separated list of distribution names.                                                                                                                                                                                            | Optional |
| gte\_first\_seen      | Epoch timestamp in milliseconds.                                                                                                                                                                                                         | Optional |
| gte\_last\_seen       | Epoch timestamp in milliseconds.                                                                                                                                                                                                         | Optional |
| lte\_first\_seen      | Epoch timestamp in milliseconds.                                                                                                                                                                                                         | Optional |
| lte\_last\_seen       | Epoch timestamp in milliseconds.                                                                                                                                                                                                         | Optional |
| ip\_list              | A comma-separated list of IP addresses.                                                                                                                                                                                                  | Optional |
| group\_name           | A comma-separated list of endpoint group names.                                                                                                                                                                                          | Optional |
| platform              | Type of operating system. Possible values are: windows, linux, macos, android.                                                                                                                                                           | Optional |
| alias                 | A comma-separated list of endpoint alias names.                                                                                                                                                                                          | Optional |
| isolate               | Filters endpoints by their isolation status. Possible values are: isolated, unisolated.                                                                                                                                                  | Optional |
| hostname              | A comma-separated list of hosts.                                                                                                                                                                                                         | Optional |
| filter\_object        | A JSON string of a list of filter objects. Overrides individual filter arguments when provided. Each object must have field, operator, and value keys. Example: \[{"field":"endpoint\_id\_list","operator":"in","value":\["ep1","ep2"]}] | Optional |
| all                   | Whether to scan all of the endpoints or not. Default is false. Note that scanning all of the endpoints may cause performance issues and latency. Possible values are: true, false. Default is false.                                     | Optional |
| interval\_in\_seconds | Interval in seconds between each poll.                                                                                                                                                                                                   | Optional |
| timeout\_in\_seconds  | Polling timeout in seconds.                                                                                                                                                                                                              | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.endpointScan.actionId** *number*

The action ID of the abort scan request.

**Core.endpointScan.aborted** *boolean*

Was the scan canceled.

</details>

#### abortEndpointScan

***

Cancels the scan on the selected endpoints. A scan can only be canceled if the selected endpoints are Pending or In Progress. To scan all endpoints, run the command with the argument all=true. Scanning all endpoints may impact performance and cause latency.

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                                          | Required |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| incident\_id       | Links the response action to the incident that triggered it.                                                                                                                                         | Optional |
| endpoint\_id\_list | A comma-separated list of endpoint IDs.                                                                                                                                                              | Optional |
| dist\_name         | A comma-separated list of distribution names.                                                                                                                                                        | Optional |
| gte\_first\_seen   | Epoch timestamp in milliseconds.                                                                                                                                                                     | Optional |
| gte\_last\_seen    | Epoch timestamp in milliseconds.                                                                                                                                                                     | Optional |
| lte\_first\_seen   | Epoch timestamp in milliseconds.                                                                                                                                                                     | Optional |
| lte\_last\_seen    | Epoch timestamp in milliseconds.                                                                                                                                                                     | Optional |
| ip\_list           | A comma-separated list of IP addresses.                                                                                                                                                              | Optional |
| group\_name        | A comma-separated list of endpoint group names.                                                                                                                                                      | Optional |
| platform           | Type of operating system. Possible values are: windows, linux, macos, android.                                                                                                                       | Optional |
| alias              | A comma-separated list of endpoint alias names.                                                                                                                                                      | Optional |
| isolate            | Choose whether an endpoint has been isolated. Select "isolated" or "unisolated". Possible values are: isolated, unisolated.                                                                          | Optional |
| hostname           | A comma-separated list of hosts.                                                                                                                                                                     | Optional |
| all                | Whether to scan all of the endpoints or not. Default is false. Note that scanning all of the endpoints may cause performance issues and latency. Possible values are: true, false. Default is false. | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.endpointScan.actionId** *number*

The action ID of the abort scan request.

**Core.endpointScan.aborted** *boolean*

Was the scan canceled.

</details>

#### getEndpointPolicy

***

Retrieves the name of the security policy currently assigned to a specific endpoint.

<details>

<summary>Arguments</summary>

| Argument Name | Description      | Required |
| ------------- | ---------------- | -------- |
| endpoint\_id  | The endpoint ID. | Required |

</details>

#### getEndpointUpdateVersion

***

Returns the agent update version distribution for the provided endpoint IDs.

<details>

<summary>Arguments</summary>

| Argument Name | Description                             | Required |
| ------------- | --------------------------------------- | -------- |
| endpoint\_ids | A comma-separated list of endpoint IDs. | Required |

</details>

<details>

<summary>Outputs</summary>

**Core.EndpointUpdateVersion.TotalCount** *number*

The total number of endpoints.

**Core.EndpointUpdateVersion.PlatformCount** *unknown*

The per-platform endpoint counts.

**Core.EndpointUpdateVersion.Distributions.Platform** *string*

The platform of the endpoints.

**Core.EndpointUpdateVersion.Distributions.Version** *string*

The agent version.

**Core.EndpointUpdateVersion.Distributions.EndpointsWithHigherVersionCount** *number*

The number of endpoints running a higher version.

**Core.EndpointUpdateVersion.Distributions.EndpointsWithSameVersionCount** *number*

The number of endpoints running the same version.

**Core.EndpointUpdateVersion.Distributions.EndpointsWithLowerVersionCount** *number*

The number of endpoints running a lower version.

</details>

#### getEndpointDeviceControlViolations

***

Gets a list of device control violations filtered by selected fields. Returns up to 100 violations. When no endpoint ID, hostname, type, or other filter is given, the command returns the most recent device control violations for the tenant.

<details>

<summary>Arguments</summary>

| Argument Name       | Description                                                                                                                                                                                                          | Required |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| endpoint\_ids       | A comma-separated list of endpoint IDs.                                                                                                                                                                              | Optional |
| types               | A comma-separated list of device types that triggered the violation. Possible values are: bluetooth, cd-rom, disk drive, floppy disk, windows portable devices, print job, sd card.                                  | Optional |
| timestamp\_gte      | Returns violations whose timestamp is greater than or equal to this value (epoch milliseconds). Supports milliseconds (e.g. 1579039377301), relative time (e.g. "3 days"), or ISO date (e.g. "2019-10-21T23:45:00"). | Optional |
| timestamp\_lte      | Returns violations whose timestamp is less than or equal to this value (epoch milliseconds). Supports milliseconds (e.g. 1579039377301), relative time (e.g. "3 days"), or ISO date (e.g. "2019-10-21T23:45:00").    | Optional |
| ip\_list            | A comma-separated list of IP addresses.                                                                                                                                                                              | Optional |
| vendors             | A comma-separated list of vendor names.                                                                                                                                                                              | Optional |
| vendor\_ids         | A comma-separated list of vendor IDs.                                                                                                                                                                                | Optional |
| products            | A comma-separated list of product names.                                                                                                                                                                             | Optional |
| product\_ids        | A comma-separated list of product IDs.                                                                                                                                                                               | Optional |
| serials             | A comma-separated list of serial numbers.                                                                                                                                                                            | Optional |
| hostnames           | A comma-separated list of hostnames.                                                                                                                                                                                 | Optional |
| violation\_id\_list | A comma-separated list of violation IDs.                                                                                                                                                                             | Optional |
| usernames           | A comma-separated list of usernames.                                                                                                                                                                                 | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.EndpointViolations.violation\_id** *number*

The unique ID of the device control violation.

**Core.EndpointViolations.endpoint\_id** *string*

The endpoint where the violation occurred.

**Core.EndpointViolations.hostname** *string*

The hostname of the endpoint.

**Core.EndpointViolations.type** *string*

The type of device that triggered the violation.

**Core.EndpointViolations.vendor** *string*

The vendor of the device.

**Core.EndpointViolations.vendor\_id** *string*

The USB vendor ID.

**Core.EndpointViolations.product** *string*

The product name of the device.

**Core.EndpointViolations.product\_id** *string*

The USB product ID.

**Core.EndpointViolations.serial** *string*

The serial number of the device.

**Core.EndpointViolations.ip** *string*

The IP address of the endpoint at the time of the violation.

**Core.EndpointViolations.os\_type** *string*

The operating system family of the endpoint.

**Core.EndpointViolations.username** *string*

The user logged in when the violation occurred.

**Core.EndpointViolations.timestamp** *number*

Time of the violation in epoch milliseconds.

**Core.EndpointViolations.date** *string*

Human-readable date derived from Timestamp.

</details>

#### addEndpointTag

***

Add a tag to one or more endpoints. If no filters are provided, the tag will be added to all endpoints.

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                    | Required |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| tag                | The tag name to assign to the endpoint(s).                                                                                                                                     | Required |
| endpoint\_id\_list | A comma-separated list of endpoint IDs by which to filter the results.                                                                                                         | Optional |
| dist\_name         | A comma-separated list of distribution package names or installation package names. Example: dist\_name1,dist\_name2.                                                          | Optional |
| ip\_list           | A comma-separated list of IP addresses. Example: 8.8.8.8,1.1.1.1.                                                                                                              | Optional |
| group\_name        | A comma-separated list of group name to which the agent belongs.                                                                                                               | Optional |
| platform           | The endpoint platform. Possible values are: windows, linux, macos, android.                                                                                                    | Optional |
| alias\_name        | A comma-separated list of alias names.                                                                                                                                         | Optional |
| isolate            | Specifies whether the endpoint was isolated or unisolated. Possible values are: isolated, unisolated.                                                                          | Optional |
| hostname           | A comma-separated list of hostnames.                                                                                                                                           | Optional |
| first\_seen\_gte   | All the agents that were first seen after the first\_seen\_gte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).  | Optional |
| first\_seen\_lte   | All the agents that were first seen before the first\_seen\_lte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date). | Optional |
| last\_seen\_gte    | All the agents that were last seen before the last\_seen\_gte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).   | Optional |
| last\_seen\_lte    | All the agents that were last seen before the last\_seen\_lte. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).   | Optional |
| status             | A comma-separated list of endpoint statuses to filter. Possible values are: connected, lost, disconnected, uninstalled.                                                        | Optional |

</details>

**Outputs**

There are no outputs for this command.

#### setEndpointAlias

***

Gets a list of endpoints according to the passed filters, and changes their alias name. If no filters are provided, the alias will be changed for all endpoints. Filtering by multiple fields will be concatenated using the AND condition (OR is not supported).

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                                      | Required |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| status             | A comma-separated list of endpoint statuses to use as a filter. Possible values are: connected, lost, disconnected, uninstalled.                                                                 | Optional |
| endpoint\_id\_list | A comma-separated list of endpoint IDs to use as a filter.                                                                                                                                       | Optional |
| dist\_name         | A comma-separated list of distribution package names or installation package names to use as a filter. Example: dist\_name1,dist\_name2.                                                         | Optional |
| ip\_list           | A comma-separated list of IP addresses to use as a filter. Example: 8.8.8.8,1.1.1.1.                                                                                                             | Optional |
| group\_name        | A comma-separated list of group names to which the agent belongs to use as a filter.                                                                                                             | Optional |
| platform           | The endpoint platform to use as a filter. Possible values are: windows, linux, macos, android.                                                                                                   | Optional |
| alias\_name        | A comma-separated list of alias names to use as a filter. Examples: alias\_name1,alias\_name2.                                                                                                   | Optional |
| isolate            | Specifies whether the endpoint was isolated or unisolated to use as a filter. Possible values are: isolated, unisolated.                                                                         | Optional |
| hostname           | A comma-separated list of hostnames to use as a filter.                                                                                                                                          | Optional |
| first\_seen\_gte   | All the agents that were first seen after {first\_seen\_gte} to use as a filter. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).   | Optional |
| first\_seen\_lte   | All the agents that were first seen before {first\_seen\_lte} to use as a filter. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).  | Optional |
| last\_seen\_gte    | All the agents that were last seen after {last\_seen\_gte} to use as a filter. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).     | Optional |
| last\_seen\_lte    | All the agents that were last seen before {last\_seen\_lte} to use as a filter. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).    | Optional |
| username           | A comma-separated list of usernames to use as a filter.                                                                                                                                          | Optional |
| new\_alias\_name   | The alias name to change to. Note: If you send an empty field, (e.g., new\_alias\_name="") the current alias name is deleted.                                                                    | Required |
| scan\_status       | A comma-separated list of scan statuses of the endpoint to use as a filter. Possible values are: none, pending, in\_progress, canceled, aborted, timeout, pending\_cancellation, success, error. | Optional |

</details>

**Outputs**

There are no outputs for this command.

#### setEndpointVersion

***

Updates the agent version on the specified endpoints, optionally within a scheduled day and time window.

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                                                                                                         | Required |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| endpoint\_ids | A comma-separated list of endpoint IDs.                                                                                                             | Required |
| platform      | The platform of the endpoints. Possible values are: windows, linux, macos.                                                                          | Required |
| version       | The target version for updating the endpoints.                                                                                                      | Required |
| start\_time   | The start time for the update, in 24-hour format (HH:MM). Ensure that there are at least two hours between the start time and the end time.         | Optional |
| end\_time     | The end time for the update, in 24-hour format (HH:MM).                                                                                             | Optional |
| days          | A comma-separated list of days of the week the update may run. Possible values are: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.EndpointUpdate.EndpointIDs** *string*

The endpoint IDs targeted by the update.

**Core.EndpointUpdate.ActionID** *string*

The resulting group action ID ('0' indicates failure).

</details>

#### blockIPs

***

Blocks one or more malicious or suspicious IPv4 or IPv6 addresses on the specified endpoints.

Note: This is a polling command.

<details>

<summary>Arguments</summary>

| Argument Name         | Description                                                                                                                              | Required |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| endpoint\_ids         | A comma-separated list of endpoint IDs that support the block-IP operation. Endpoint IDs can be obtained using the getEndpoints command. | Required |
| ip\_addresses         | A comma-separated list of IPv4 or IPv6 addresses to block.                                                                               | Required |
| duration              | Number of minutes to block the addresses (1 – 518,399). Defaults to 300.                                                                 | Optional |
| interval\_in\_seconds | Seconds to wait between polling cycles. Default is 10.                                                                                   | Optional |
| timeout\_in\_seconds  | Maximum polling duration in seconds. Default is 60.                                                                                      | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.ip\_block\_results.ip\_address** *string*

The IPv4 or IPv6 address that was processed.

**Core.ip\_block\_results.endpoint\_id** *string*

The endpoint on which the block-IP action was attempted.

**Core.ip\_block\_results.reason** *string*

'Success' on success, or ': ' describing the failure.

</details>

#### removeEndpointTag

***

Remove a tag from one or more endpoints. If no filters are provided, the tag will be removed from all endpoints.

<details>

<summary>Arguments</summary>

| Argument Name      | Description                                                                                                                                                                  | Required |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| tag                | The tag name to remove from the endpoint(s).                                                                                                                                 | Required |
| endpoint\_id\_list | A comma-separated list of endpoint IDs to filter by them.                                                                                                                    | Optional |
| dist\_name         | A comma-separated list of distribution package names or installation package names. Example: dist\_name1,dist\_name2.                                                        | Optional |
| ip\_list           | A comma-separated list of IP addresses. Example: 8.8.8.8,1.1.1.1.                                                                                                            | Optional |
| group\_name        | A comma-separated list of group names to which the agent belongs. Example: group\_name1,group\_name2.                                                                        | Optional |
| platform           | The endpoint platform. Possible values are: windows, linux, macos, android.                                                                                                  | Optional |
| alias\_name        | A comma-separated list of alias names. Examples: alias\_name1,alias\_name2.                                                                                                  | Optional |
| isolate            | Specifies whether the endpoint was isolated or unisolated. Possible values are: isolated, unisolated.                                                                        | Optional |
| hostname           | A comma-separated list of hostnames. Example: hostname1,hostname2.                                                                                                           | Optional |
| first\_seen\_gte   | All the agents that were first seen after {first\_seen\_gte}. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).  | Optional |
| first\_seen\_lte   | All the agents that were first seen before {first\_seen\_lte}. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date). | Optional |
| last\_seen\_gte    | All the agents that were last seen before {last\_seen\_gte}. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).   | Optional |
| last\_seen\_lte    | All the agents that were last seen before {last\_seen\_lte}. Supported values: 1579039377301 (time in milliseconds) "3 days" (relative date) "2019-10-21T23:45:00" (date).   | Optional |
| status             | A comma-separated list of endpoint statuses to filter. Possible values are: connected, lost, disconnected, uninstalled.                                                      | Optional |

</details>

**Outputs**

There are no outputs for this command.

#### retrieveFiles

***

Retrieves files from the selected endpoints and uploads them for forensic analysis. Up to 20 files from no more than 10 endpoints can be retrieved per call.

Note: This is a polling command.

<details>

<summary>Arguments</summary>

| Argument Name         | Description                                                                                                                                                                  | Required |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| endpoint\_ids         | A comma-separated list of endpoint IDs to retrieve files from. Endpoint IDs can be obtained using the getEndpoints command.                                                  | Required |
| windows\_file\_paths  | A comma-separated list of file paths on Windows endpoints.                                                                                                                   | Optional |
| linux\_file\_paths    | A comma-separated list of file paths on Linux endpoints.                                                                                                                     | Optional |
| mac\_file\_paths      | A comma-separated list of file paths on macOS endpoints.                                                                                                                     | Optional |
| generic\_file\_path   | A comma-separated list of file paths used in parallel with endpoint\_ids (the n-th file path is retrieved from the n-th endpoint). Use instead of the per-OS path arguments. | Optional |
| alert\_id             | Links the response action to the case that triggered it.                                                                                                                     | Optional |
| interval\_in\_seconds | Seconds to wait between polling cycles. Default is 10.                                                                                                                       | Optional |
| timeout\_in\_seconds  | Maximum polling duration in seconds. Default is 600.                                                                                                                         | Optional |

</details>

<details>

<summary>Outputs</summary>

**File.Size** *number*

The size of the file.

**File.SHA1** *string*

The SHA1 hash of the file.

**File.SHA256** *string*

The SHA256 hash of the file.

**File.Name** *string*

The name of the file.

**File.SSDeep** *string*

The SSDeep hash of the file.

**File.EntryID** *string*

The entry ID of the file.

**File.Info** *string*

File information.

**File.Type** *string*

The file type.

**File.MD5** *string*

The MD5 hash of the file.

**File.Extension** *string*

The file extension.

</details>

#### terminateCausality

***

Terminates a process tree on an agent by its causality ID.

<details>

<summary>Arguments</summary>

| Argument Name         | Description                                                                                                            | Required |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------- |
| agent\_id             | The agent (endpoint) ID on which to terminate the causality. Agent IDs can be obtained using the getEndpoints command. | Required |
| causality\_id         | A comma-separated list of causality IDs to terminate.                                                                  | Required |
| process\_name         | The name of the process being terminated. Used in the human-readable output.                                           | Optional |
| alert\_id             | Links the response action to the case that triggered it.                                                               | Optional |
| interval\_in\_seconds | Seconds to wait between polling cycles. Default is 10.                                                                 | Optional |
| timeout\_in\_seconds  | Maximum polling duration in seconds. Default is 600.                                                                   | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.TerminateCausality(val.action\_id && val.action\_id == obj.action\_id).action\_id** *number*

The group action ID returned for the terminate request.

**Core.GetActionStatus.action\_id** *number*

The specified action ID.

**Core.GetActionStatus.endpoint\_id** *string*

Endpoint ID.

**Core.GetActionStatus.status** *string*

The status of the specific endpoint ID.

**Core.GetActionStatus.error\_description** *string*

Description of the error if the action failed.

**Core.GetActionStatus.ErrorReasons.bucket** *string*

The bucket in which the error occurred.

**Core.GetActionStatus.ErrorReasons.file\_name** *string*

The name of the file that caused the error.

**Core.GetActionStatus.ErrorReasons.file\_path** *string*

The path of the file that caused the error.

**Core.GetActionStatus.ErrorReasons.file\_size** *number*

The size of the file that caused the error.

**Core.GetActionStatus.ErrorReasons.missing\_files** *unknown*

The missing files that caused the error.

**Core.GetActionStatus.ErrorReasons.errorData** *string*

The error reason data.

**Core.GetActionStatus.ErrorReasons.terminated\_by** *string*

The instance ID which terminated the action and caused the error.

**Core.GetActionStatus.ErrorReasons.errorDescription** *string*

The error reason description.

**Core.GetActionStatus.ErrorReasons.terminate\_result.path** *string*

The path of the file the terminate action targeted.

**Core.GetActionStatus.ErrorReasons.terminate\_result.status** *number*

The terminate result status code for the file.

</details>

#### terminateProcess

***

Terminates a process on an agent by its instance ID.

Note: This is a polling command.

<details>

<summary>Arguments</summary>

| Argument Name         | Description                                                                                                          | Required |
| --------------------- | -------------------------------------------------------------------------------------------------------------------- | -------- |
| agent\_id             | The agent (endpoint) ID on which to terminate the process. Agent IDs can be obtained using the getEndpoints command. | Required |
| instance\_id          | A comma-separated list of process instance IDs to terminate.                                                         | Required |
| process\_name         | The name of the process being terminated. Used in the human-readable output.                                         | Optional |
| alert\_id             | Links the response action to the case that triggered it.                                                             | Optional |
| interval\_in\_seconds | Seconds to wait between polling cycles. Default is 10.                                                               | Optional |
| timeout\_in\_seconds  | Maximum polling duration in seconds. Default is 600.                                                                 | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.TerminateProcess(val.action\_id && val.action\_id == obj.action\_id).action\_id** *number*

The group action ID returned for the terminate request.

**Core.GetActionStatus.action\_id** *number*

The specified action ID.

**Core.GetActionStatus.endpoint\_id** *string*

Endpoint ID.

**Core.GetActionStatus.status** *string*

The status of the specific endpoint ID.

**Core.GetActionStatus.error\_description** *string*

Description of the error if the action failed.

**Core.GetActionStatus.ErrorReasons.bucket** *string*

The bucket in which the error occurred.

**Core.GetActionStatus.ErrorReasons.file\_name** *string*

The name of the file that caused the error.

**Core.GetActionStatus.ErrorReasons.file\_path** *string*

The path of the file that caused the error.

**Core.GetActionStatus.ErrorReasons.file\_size** *number*

The size of the file that caused the error.

**Core.GetActionStatus.ErrorReasons.missing\_files** *unknown*

The missing files that caused the error.

**Core.GetActionStatus.ErrorReasons.errorData** *string*

The error reason data.

**Core.GetActionStatus.ErrorReasons.terminated\_by** *string*

The instance ID which terminated the action and caused the error.

**Core.GetActionStatus.ErrorReasons.errorDescription** *string*

The error reason description.

**Core.GetActionStatus.ErrorReasons.terminate\_result.path** *string*

The path of the file the terminate action targeted.

**Core.GetActionStatus.ErrorReasons.terminate\_result.status** *number*

The terminate result status code for the file.

</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/endpoint-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.
