Skip to Content
kosemdocs
ReferenceAPIAgents

Remove agent secret grant

Removes a secret from an agent, with what the agent bound of it. Returns the grants the agent has left. The agent's commands are given none of the secret's values from then on, and kosem issues it none of the secret's credentials. The agent's bindings of the secret are removed, and the agent is told, as a config change by the caller whose removedSecrets names the secret. Credentials already issued work until they expire, and a value the agent already read, or a command that started before, keeps what it had. Takes agents.secretGrants.delete, which the agent's owners have, and no access to the secret. Fails with not_found when the agent has neither a grant nor a binding of it.

DELETE
/v1/projects/{project}/agents/{agent}/secretGrants/{secret}

Removes a secret from an agent, with what the agent bound of it. Returns the grants the agent has left.

The agent's commands are given none of the secret's values from then on, and kosem issues it none of the secret's credentials. The agent's bindings of the secret are removed, and the agent is told, as a config change by the caller whose removedSecrets names the secret. Credentials already issued work until they expire, and a value the agent already read, or a command that started before, keeps what it had. Takes agents.secretGrants.delete, which the agent's owners have, and no access to the secret. Fails with not_found when the agent has neither a grant nor a binding of it.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID.

Match^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$
agent*string

The agent's ID.

Match^ags_[0-7][0-9a-hjkmnp-tv-z]{25}$
secret*string

The secret's ID.

Match^sec_[0-7][0-9a-hjkmnp-tv-z]{25}$

Response Body

OK

application/json
  1. response
secretGrants*array<>

The agent's grants, the oldest first.

Example Request
curl -X DELETE 'https://api.kosem.ai/v1/projects/string/agents/string/secretGrants/string'
Example Response
{
  "secretGrants": [
    {
      "createTime": "2019-08-24T14:15:22Z",
      "grantor": "string",
      "secret": "string"
    }
  ]
}