Related guides
Endpoints
Next steps
- API overview: base URLs, authentication, and pagination
- Errors: status codes and the error format
- Editions: which endpoints each edition serves
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Attach and detach app connections and secrets for agents with the OneCLI API. Set per-tool allow and ask lists, and every change applies instantly.
| Endpoint | Method and path | What it does |
|---|---|---|
| Get an agent’s grants | GET /agents/{agentId}/grants | Get everything granted to one agent: its app connections with per-tool lists and resource scoping, plus the secrets attached to it. |
| Attach a connection to an agent | PUT /agents/{agentId}/grants/connections/{connectionId} | Attach an app connection to an agent with full access or custom allow and ask tool lists. |
| Detach a connection from an agent | DELETE /agents/{agentId}/grants/connections/{connectionId} | Detach an app connection from an agent. |
| Attach a secret to an agent | PUT /agents/{agentId}/grants/secrets/{secretId} | Attach a secret, such as an API key or LLM key, to an agent. |
| Detach a secret from an agent | DELETE /agents/{agentId}/grants/secrets/{secretId} | Detach a secret from an agent. |
| Get a connection’s grants | GET /connections/{connectionId}/grants | See which agents hold a grant for one connection and each agent’s access level. |
| Attach an agent to a connection | PUT /connections/{connectionId}/grants/agents/{agentId} | Attach an agent to a connection from the connection’s side. |
| Detach an agent from a connection | DELETE /connections/{connectionId}/grants/agents/{agentId} | Detach an agent from a connection, addressed from the connection’s side. |