v53

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-076771,7565.2 MB
Elastic Agent actions

Reassign an agent

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/{agentId}/reassign</span></div>

Refer to Spaces for more information.

Reassign an agent to a different agent policy.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.

post/api/fleet/agents/{agentId}/reassign

Path parameters

agentIdstring required

The agent ID

Headers

kbn-xsrfstring required
Example:true

A required header to protect against CSRF attacks

Request body

policy_idstring required

Response

Successful response

object required