Elastic Stack (ELK Stack) Elastic Agent actions API

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.

Business capability
IT Operations Management BC-600.40

Operations 16

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /api/fleet/agents/{agentId}/actions Send a custom action to one Fleet agent · Create an agent action #
Ask an LLM
“Can I push a custom action to a single Elastic Agent?”
“What kinds of actions can I queue for one agent through Fleet?”
Tell an agent
Send action {action} to agent {agentId}.
Queue a custom Fleet action {action} for agent {agentId}.
POST /api/fleet/agents/{agentId}/reassign Move one agent to another policy · Reassign an agent #
Ask an LLM
“How do I move a single Elastic Agent to a different agent policy?”
“Can I change which policy one agent is enrolled in?”
Tell an agent
Reassign agent {agentId} to policy {policy_id}.
Move agent {agentId} onto agent policy {policy_id}.
POST /api/fleet/agents/{agentId}/remove_collector Remove one OpAMP collector from Fleet · Remove an OpAMP collector #
Ask an LLM
“How do I take a single OpAMP collector off the Fleet agents list?”
“Can a removed collector reconnect since its API keys stay valid?”
Tell an agent destructive · confirm first
Remove OpAMP collector {agentId} from Fleet.
Mark collector {agentId} as unenrolled.
POST /api/fleet/agents/{agentId}/request_diagnostics Request diagnostics from one agent · Request agent diagnostics #
Ask an LLM
“How do I collect a diagnostics bundle from a misbehaving Elastic Agent?”
“Can the diagnostics bundle include extra metrics like CPU profiles?”
Tell an agent
Request a diagnostics bundle from agent {agentId}.
Collect diagnostics from agent {agentId} with extra metrics {additional_metrics}.
POST /api/fleet/agents/{agentId}/rollback Roll back one agent to its previous version · Rollback an agent #
Ask an LLM
“Can I undo an Elastic Agent upgrade on one host?”
“How do I roll a single agent back to the version it ran before?”
Tell an agent
Roll back agent {agentId} to its previous version.
Revert the upgrade on agent {agentId}.
POST /api/fleet/agents/{agentId}/unenroll Unenroll one agent from Fleet · Unenroll an agent #
Ask an LLM
“How do I unenroll a single Elastic Agent from Fleet?”
“Can I also revoke the agent's enrollment API key when unenrolling it?”
Tell an agent destructive · confirm first
Unenroll agent {agentId}.
Unenroll agent {agentId} and revoke its API key ({revoke}).
POST /api/fleet/agents/{agentId}/upgrade Upgrade one agent to a new version · Upgrade an agent #
Ask an LLM
“How do I upgrade a single Elastic Agent to a specific version?”
“Can I upgrade an agent from a custom download source?”
Tell an agent
Upgrade agent {agentId} to version {version}.
Upgrade agent {agentId} to {version} using source {source_uri}.
GET /api/fleet/agents/action_status Check progress of recent agent actions · Get an agent action status #
Ask an LLM
“Did my recent Fleet upgrade or reassign actions finish successfully?”
“Can I see only scheduled agent actions and their status?”
Tell an agent
Show the status of recent Fleet agent actions.
List the latest {latest} agent actions since {date}.
POST /api/fleet/agents/actions/{actionId}/cancel Cancel a pending agent action · Cancel an agent action #
Ask an LLM
“Can I cancel a Fleet action that hasn't run yet, like a scheduled upgrade?”
“How do I stop a pending agent action?”
Tell an agent destructive · confirm first
Cancel agent action {actionId}.
Stop pending Fleet action {actionId}.
POST /api/fleet/agents/bulk_reassign Move many agents to another policy · Bulk reassign agents #
Ask an LLM
“How do I move a whole group of agents to a new policy at once?”
“Can I dry-run a bulk reassignment first?”
Tell an agent
Reassign agents {agents} to policy {policy_id}.
Bulk move agents {agents} onto policy {policy_id}, including inactive ones ({includeInactive}).
POST /api/fleet/agents/bulk_remove_collectors Remove many OpAMP collectors from Fleet · Bulk remove OpAMP collectors #
Ask an LLM
“Can I clear several OpAMP collectors from the Fleet list in one go?”
“Will bulk-removed collectors be able to reconnect on their own?”
Tell an agent destructive · confirm first
Remove OpAMP collectors {agents} from Fleet.
Dry-run removing collectors {agents} ({dryRun}).
POST /api/fleet/agents/bulk_request_diagnostics Request diagnostics from many agents · Bulk request diagnostics from agents #
Ask an LLM
“Can I gather diagnostics bundles from a batch of agents at once?”
“Is there a batch size setting when requesting diagnostics in bulk?”
Tell an agent
Request diagnostics bundles from agents {agents}.
Collect diagnostics from agents {agents} in batches of {batchSize}.
POST /api/fleet/agents/bulk_rollback Roll back many agents to previous versions · Bulk rollback agents #
Ask an LLM
“How do I roll back a failed agent upgrade across many hosts?”
“Can a bulk rollback include inactive agents?”
Tell an agent
Roll back agents {agents} to their previous version.
Revert upgrades on agents {agents} in batches of {batchSize}.
POST /api/fleet/agents/bulk_unenroll Unenroll many agents from Fleet · Bulk unenroll agents #
Ask an LLM
“Can I unenroll a list of agents in one request?”
“Does bulk unenroll let me revoke the agents' enrollment keys too?”
Tell an agent destructive · confirm first
Unenroll agents {agents}.
Force unenroll agents {agents} and revoke their keys ({revoke}).
POST /api/fleet/agents/bulk_update_agent_tags Add or remove tags on many agents · Bulk update agent tags #
Ask an LLM
“How do I tag a group of Elastic Agents?”
“Can I add some tags and remove others across agents in one call?”
Tell an agent
Add tags {tagsToAdd} to agents {agents}.
Remove tags {tagsToRemove} from agents {agents}.
POST /api/fleet/agents/bulk_upgrade Upgrade many agents with a rollout · Bulk upgrade agents #
Ask an LLM
“Can I upgrade my whole fleet of agents to a new version?”
“Is it possible to spread a bulk upgrade over a rollout window or start it later?”
Tell an agent
Upgrade agents {agents} to version {version}.
Upgrade agents {agents} to {version} over {rollout_duration_seconds} seconds starting at {start_time}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elk-stack:elk-stack-elastic-agent-actions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elk-stack-elastic-agent-actions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    name: Kibana Team
  description: The Kibana REST APIs enable you to manage resources such as connectors, data views, and saved objects.
  title: Kibana Elastic Agent actions API
  version: ''
  x-doc-license:
    name: Attribution-NonCommercial-NoDerivatives 4.0 International
    url: https://creativecommons.org/licenses/by-nc-nd/4.0/
  x-feedbackLink:
    label: Feedback
    url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
servers:
- url: https://{kibana_url}
  variables:
    kibana_url:
      default: localhost:5601
security:
- apiKeyAuth: []
- basicAuth: []
tags:


# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-elastic-agent-actions-api-openapi.yml