---
title: "Bulk restart agents"
method: POST
path: "/api/fleet/agents/bulk_restart"
tags: ["Elastic Agent actions"]
---

# Bulk restart agents

`POST /api/fleet/agents/bulk_restart`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/fleet/agents/bulk_restart`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

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

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

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

Restart multiple Elastic Agents. Agents that are enrolled in a hosted policy or are on a version earlier than 9.6.0 are excluded from the action and receive individual error results.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `agents` union, required
    - string[]
    - string
  - `batchSize` number
  - `includeInactive` boolean

## Response `200`

OK: A successful request.

- union
  - KibanaHTTPAPIsActionIdResponse
    - `actionId` string, required
  - KibanaHTTPAPIsActionMessageResponse
    - `message` string, required

## Other responses

- `400`: A 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)
