---
type: api
title: Elastic Agent actions
description: Elastic Agent actions APIs enable you to manage actions performed on Elastic Agents, including agent reassignment, diagnostics collection, enrollment management, upgrades, and bulk operations for agent lifecycle management.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/group/endpoint-elastic-agent-actions
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/group/endpoint-elastic-agent-actions
products:
  - Kibana
---

# Elastic Agent actions

Elastic Agent actions APIs enable you to manage actions performed on Elastic Agents, including agent reassignment, diagnostics collection, enrollment management, upgrades, and bulk operations for agent lifecycle management.

- [Create an agent action](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-actions): `POST` `/api/fleet/agents/{agentId}/actions`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/actions`
- [Reassign an agent](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-reassign): `POST` `/api/fleet/agents/{agentId}/reassign`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/reassign`
- [Remove an OpAMP collector](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-remove-collector): `POST` `/api/fleet/agents/{agentId}/remove_collector`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/remove_collector`
- [Request agent diagnostics](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-request-diagnostics): `POST` `/api/fleet/agents/{agentId}/request_diagnostics`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/request_diagnostics`
- [Restart an agent](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-restart): `POST` `/api/fleet/agents/{agentId}/restart`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/restart`
- [Rollback an agent](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-rollback): `POST` `/api/fleet/agents/{agentId}/rollback`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/rollback`
- [Unenroll an agent](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-unenroll): `POST` `/api/fleet/agents/{agentId}/unenroll`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/unenroll`
- [Upgrade an agent](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-agentid-upgrade): `POST` `/api/fleet/agents/{agentId}/upgrade`, `POST` `/s/{space_id}/api/fleet/agents/{agentId}/upgrade`
- [Get an agent action status](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-get-fleet-agents-action-status): `GET` `/api/fleet/agents/action_status`, `GET` `/s/{space_id}/api/fleet/agents/action_status`
- [Cancel an agent action](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-actions-actionid-cancel): `POST` `/api/fleet/agents/actions/{actionId}/cancel`, `POST` `/s/{space_id}/api/fleet/agents/actions/{actionId}/cancel`
- [Bulk reassign agents](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-reassign): `POST` `/api/fleet/agents/bulk_reassign`, `POST` `/s/{space_id}/api/fleet/agents/bulk_reassign`
- [Bulk remove OpAMP collectors](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-remove-collectors): `POST` `/api/fleet/agents/bulk_remove_collectors`, `POST` `/s/{space_id}/api/fleet/agents/bulk_remove_collectors`
- [Bulk request diagnostics from agents](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-request-diagnostics): `POST` `/api/fleet/agents/bulk_request_diagnostics`, `POST` `/s/{space_id}/api/fleet/agents/bulk_request_diagnostics`
- [Bulk restart agents](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-restart): `POST` `/api/fleet/agents/bulk_restart`, `POST` `/s/{space_id}/api/fleet/agents/bulk_restart`
- [Bulk rollback agents](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-rollback): `POST` `/api/fleet/agents/bulk_rollback`, `POST` `/s/{space_id}/api/fleet/agents/bulk_rollback`
- [Bulk unenroll agents](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-unenroll): `POST` `/api/fleet/agents/bulk_unenroll`, `POST` `/s/{space_id}/api/fleet/agents/bulk_unenroll`
- [Bulk update agent tags](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-update-agent-tags): `POST` `/api/fleet/agents/bulk_update_agent_tags`, `POST` `/s/{space_id}/api/fleet/agents/bulk_update_agent_tags`
- [Bulk upgrade agents](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-agents-bulk-upgrade): `POST` `/api/fleet/agents/bulk_upgrade`, `POST` `/s/{space_id}/api/fleet/agents/bulk_upgrade`
