Spaces method and path for this operation:
post /s/{space_id}/api/fleet/agents/{agentId}/restart
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.
[Required authorization] Route required privileges: fleet-agents-all.
POST
/api/fleet/agents/{agentId}/restart
curl \
--request POST 'https://localhost:5601/api/fleet/agents/{agentId}/restart' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Response examples (200)
{
"actionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Response examples (400)
{
"message": "Bad Request"
}