Elastic Stack (ELK Stack) Elastic Agent policies API

Elastic Agent policies APIs enable you to manage agent policies, including creating, updating, and deleting policies, as well as to retrieve agent policy outputs, manifests, and auto-upgrade status information.

Operations 14

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

GET /api/fleet/agent_policies List Fleet agent policies · Get agent policies #
Ask an LLM
“How do I list all the agent policies in Fleet?”
“Can I see only the policies that have agents available to upgrade?”
Tell an agent
List all Fleet agent policies with their agent counts.
Find agent policies matching KQL {kuery}.
POST /api/fleet/agent_policies Create a Fleet agent policy · Create an agent policy #
Ask an LLM
“How do I create a new agent policy in Fleet?”
“Can a new agent policy include the system integration automatically?”
Tell an agent
Create an agent policy named {name} in namespace {namespace}.
Create agent policy {name} in {namespace} with description {description}.
POST /api/fleet/agent_policies/_bulk_get Fetch several agent policies by ID at once · Bulk get agent policies #
Ask an LLM
“Can I retrieve a batch of agent policies in one call by their IDs?”
“Is there a way to skip missing IDs when fetching several policies together?”
Tell an agent
Bulk fetch the agent policies with IDs {ids}.
Get policies {ids} with package policies populated, ignoring any that are missing.
GET /api/fleet/agent_policies/{agentPolicyId} Get one agent policy · Get an agent policy #
Ask an LLM
“How do I look up a single Fleet agent policy by its ID?”
“What namespace and settings does one particular agent policy have?”
Tell an agent
Get agent policy {agentPolicyId}.
Show the settings of agent policy {agentPolicyId} in {format} format.
PUT /api/fleet/agent_policies/{agentPolicyId} Update an agent policy · Update an agent policy #
Ask an LLM
“How do I rename an existing agent policy or move it to another namespace?”
“Can I change the global data tags on a policy that's already in use?”
Tell an agent
Update agent policy {agentPolicyId} to name {name} in namespace {namespace}.
Set global data tags {global_data_tags} on policy {agentPolicyId}, keeping name {name} and namespace {namespace}.
GET /api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status Check auto-upgrade status of a policy's agents · Get auto upgrade agent status #
Ask an LLM
“How far along is the automatic upgrade of agents on one policy?”
“Can I see which agents under a policy have auto-upgraded?”
Tell an agent
Get the auto-upgrade agent status for policy {agentPolicyId}.
Show how agents on {agentPolicyId} are progressing with automatic upgrades.
POST /api/fleet/agent_policies/{agentPolicyId}/copy Duplicate an agent policy · Copy an agent policy #
Ask an LLM
“Can I clone an existing agent policy under a new name?”
“How do I start a new policy from a copy of one that already works?”
Tell an agent
Copy agent policy {agentPolicyId} as {name}.
Duplicate policy {agentPolicyId} and call the copy {name}.
GET /api/fleet/agent_policies/{agentPolicyId}/download Download an agent policy file · Download an agent policy #
Ask an LLM
“How do I download an agent policy as a file for a standalone Elastic Agent?”
“Can I download a policy file as it was at an earlier revision?”
Tell an agent
Download policy {agentPolicyId} formatted for standalone agents when standalone is {standalone}.
Download revision {revision} of policy {agentPolicyId}.
GET /api/fleet/agent_policies/{agentPolicyId}/full Get the full compiled agent policy · Get a full agent policy #
Ask an LLM
“How do I see the complete compiled policy an agent actually receives?”
“Can I view the full policy formatted for a Kubernetes deployment?”
Tell an agent
Get the full compiled policy for {agentPolicyId}.
Show the full policy {agentPolicyId} formatted for Kubernetes when kubernetes is {kubernetes}.
GET /api/fleet/agent_policies/{agentPolicyId}/outputs List outputs used by one agent policy · Get outputs for an agent policy #
Ask an LLM
“Where does a given agent policy send its data and monitoring output?”
“Which outputs are attached to a single agent policy?”
Tell an agent
List the outputs for agent policy {agentPolicyId}.
Show where policy {agentPolicyId} ships its data.
POST /api/fleet/agent_policies/delete Delete an agent policy · Delete an agent policy #
Ask an LLM
“How do I delete an agent policy from Fleet?”
“Can I bypass the checks that block deleting a policy?”
Tell an agent destructive · confirm first
Delete agent policy {agentPolicyId}.
Force-delete policy {agentPolicyId}, bypassing validation with force set to {force}.
POST /api/fleet/agent_policies/outputs List outputs for several agent policies · Get outputs for agent policies #
Ask an LLM
“Can I get the outputs for a batch of agent policies in one request?”
“What outputs do a set of policies send data to?”
Tell an agent
Get the outputs for agent policies {ids}.
Show the data outputs configured across policies {ids}.
GET /api/fleet/kubernetes Get the Elastic Agent Kubernetes manifest · Get a full K8s agent manifest #
Ask an LLM
“How do I get a Kubernetes manifest for deploying Elastic Agent?”
“Can the manifest include my Fleet Server URL and enrollment token?”
Tell an agent
Generate the Kubernetes manifest with Fleet Server {fleetServer} and enrollment token {enrolToken}.
Show me the Elastic Agent Kubernetes manifest inline.
GET /api/fleet/kubernetes/download Download the Elastic Agent Kubernetes manifest file · Download an agent manifest #
Ask an LLM
“Where can I download the Kubernetes manifest as a file to apply with kubectl?”
“Is there a download endpoint for the agent manifest separate from viewing it?”
Tell an agent
Download the Kubernetes manifest file pointed at Fleet Server {fleetServer}.
Save the agent manifest as a file with enrollment token {enrolToken}.

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-policies-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-policies-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 policies 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 (113 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-elastic-agent-policies-api-openapi.yml