Elastic Agent actions

Restart 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}/restart</span></div>

Refer to Spaces for more information.

Restart an Elastic Agent. The request fails when the agent is inactive, on a version earlier than 9.6.0, or enrolled in a hosted agent policy.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.

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

Request

  • Base URL
    https://localhost:5601
  • URL
    https://localhost:5601/api/fleet/agents/{agentId}/restart
  • Auth
    • API key in header Authorization
    • or HTTP basic

Path parameters

agentIdstring required

The agent ID to restart

Headers

kbn-xsrfstring required
Example:true

A required header to protect against CSRF attacks

Response

OK: A successful request.

OR

Changes