Skip to Content
kosemdocs
ReferenceAPIAgents

Remove agent grant

Revokes an access profile or secret grant from an agent and flushes its environment's credential cache immediately. Allowed for either the agent's owner (agents.secretGrants.delete) or the target resource's IAM admin (setIamPolicy), so admins can revoke directly from a resource's Agents tab.

DELETE
/v1/projects/{project}/agents/{agent}/grants/{grant}

Revokes an access profile or secret grant from an agent and flushes its environment's credential cache immediately.

Allowed for either the agent's owner (agents.secretGrants.delete) or the target resource's IAM admin (setIamPolicy), so admins can revoke directly from a resource's Agents tab.

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}$
grant*string

The grant's ID.

Formatuuid

Response Body

OK

application/json
  1. response
grants*array<>

Grants held by the agent, oldest first.

Example Request
curl -X DELETE 'https://api.kosem.ai/v1/projects/string/agents/string/grants/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "grants": [
    {
      "alias": "string",
      "createTime": "2019-08-24T14:15:22Z",
      "expireTime": "2019-08-24T14:15:22Z",
      "grantor": "string",
      "id": "string",
      "lastUsedTime": "2019-08-24T14:15:22Z",
      "provider": "string",
      "scope": {
        "property1": null,
        "property2": null
      },
      "target": "string",
      "targetKind": "ACCESS_PROFILE",
      "useCount": 0
    }
  ]
}