---
title: "Get auto upgrade agent status"
method: GET
path: "/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status"
tags: ["Elastic Agent policies"]
---

# Get auto upgrade agent status

`GET /api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

**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/agent_policies/{agentPolicyId}/auto_upgrade_agents_status</span></div>

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

Get the auto-upgrade status for agents assigned to an agent policy.<br/><br/>[Required authorization] Route required privileges: fleet-agents-read.

## Path parameters

- `agentPolicyId` string, required

## Response `200`

Successful response

- object
  - `currentVersions` object[], required
    - `agents` number, required: Number of agents that upgraded to this version
    - `failedUpgradeActionIds` string[]: List of action IDs related to failed upgrades
    - `failedUpgradeAgents` number, required: Number of agents that failed to upgrade to this version
    - `inProgressUpgradeActionIds` string[]: List of action IDs related to in-progress upgrades
    - `inProgressUpgradeAgents` number, required: Number of agents that are upgrading to this version
    - `version` string, required: Agent version
  - `totalAgents` number, required

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) - [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/elastic/apis/kibana-apis/revisions/b87131d80c52?raw)
