Download an agent policy

Base URL
https://{kibana_url}
Auth

Download an agent policy by ID.

[Required authorization] Route required privileges: (fleet-agent-policies-read AND integrations-read) OR fleet-setup.

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

agentPolicyId string · min length: 0 required

The ID of the agent policy

Query parameters

download boolean

If true, returns the policy as a downloadable file

standalone boolean

If true, returns the policy formatted for standalone agents

kubernetes boolean

If true, returns the policy formatted for Kubernetes deployment

revision number

If provided, returns the policy at the specified revision. Cannot be used with standalone or kubernetes flags.

Responses

Successful response — returns the agent policy as a YAML file download

application/json

Response Type: string

Bad Request

application/json
attributes object required
error string
errorType string
message string required
statusCode number

Not Found

application/json
attributes object required
error string
errorType string
message string required
statusCode number
Base URL
https://{kibana_url}