Update an agent's access control list
- Base URL
-
https://{kibana_url}
- PUT /api/agent_builder/agents/{id}/access_control
- PUT /s/{space_id}/api/agent_builder/agents/{id}/access_control
Replace the per-agent access-control entries. The agent owner, cluster admins, and anyone access control grants Manager can call this endpoint. Each call replaces the entire entries list — the most recent successful update wins. To learn more about agents, refer to the agents documentation.
Required privileges
agentBuilder:manageAgents
Path parameters
-
space_idstringoptional -
An identifier for the space. If
space_idis not provided in the URL, the default space is used. Refer to Spaces for more information.
Request body
-
entriesobject[] · max items: 100required -
Access-control entries to apply to the agent. Each entry has a
type(currently onlyuseris supported), aname(the principal username), and arole.
Responses
Indicates a successful response
Bad Request — the request body failed validation, or the request targets the built-in Elastic default agent (which cannot have custom access control).
Not Found — no agent with this ID is visible to the caller, or the caller lacks write access. Matches the existing agentNotFound shape so unprivileged callers cannot probe for hidden agents.