---
title: "Get an agent action status"
method: GET
path: "/api/fleet/agents/action_status"
tags: ["Elastic Agent actions"]
---

# Get an agent action status

`GET /api/fleet/agents/action_status`

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/agents/action_status</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Get the current status of recent agent actions.<br/><br/>[Required authorization] Route required privileges: fleet-agents-read.

## Query parameters

- `page` number
- `perPage` number
- `date` string
- `latest` number
- `errorSize` number

## Response `200`

Successful response

- object
  - `items` object[], required
    - `actionId` string, required
    - `cancellationTime` string
    - `completionTime` string
    - `creationTime` string, required — creation time of action
    - `expiration` string
    - `hasRolloutPeriod` boolean
    - `is_automatic` boolean
    - `latestErrors` object[]
      - `agentId` string, required
      - `error` string, required
      - `hostname` string
      - `timestamp` string, required
    - `nbAgentsAck` number, required — number of agents that acknowledged the action
    - `nbAgentsActionCreated` number, required — number of agents included in action from kibana
    - `nbAgentsActioned` number, required — number of agents actioned
    - `nbAgentsFailed` number, required — number of agents that failed to execute the action
    - `newPolicyId` string — new policy id (POLICY_REASSIGN action)
    - `policyId` string — policy id (POLICY_CHANGE action)
    - `revision` number — new policy revision (POLICY_CHANGE action)
    - `startTime` string — start time of action (scheduled actions)
    - `status` 'COMPLETE' | 'EXPIRED' | 'CANCELLED' | 'FAILED' | 'IN_PROGRESS' | 'ROLLOUT_PASSED', required
    - `type` 'UPGRADE' | 'UNENROLL' | 'SETTINGS' | 'POLICY_REASSIGN' | 'CANCEL' | 'FORCE_UNENROLL' | 'REQUEST_DIAGNOSTICS' | 'UPDATE_TAGS' | 'POLICY_CHANGE' | 'INPUT_ACTION' | 'MIGRATE' | 'PRIVILEGE_LEVEL_CHANGE' | 'ROLLBACK' | 'REMOVE_COLLECTOR', required
    - `version` string — agent version number (UPGRADE action)

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
