Skip to Content
kosemdocs
ReferenceAPIAgents

Test IAM permissions

Returns which of the given permissions the caller holds on an agent.

POST
/v1/projects/{project}/agents/{agent}/test-permissions

Returns which of the given permissions the caller holds on an agent.

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}$

Request Body

application/json
  1. body
permissions*array<string>

Permissions to test, such as resourcemanager.projects.get.

Items1 <= items <= 100

Response Body

OK

application/json
  1. response
permissions*array<string>

The permissions tested that the caller holds.

Example Request
curl -X POST 'https://api.kosem.ai/v1/projects/string/agents/string/test-permissions' \
  -H 'Content-Type: application/json' \
  -d '{
  "permissions": [
    "string"
  ]
}'
Example Response
{
  "permissions": [
    "string"
  ]
}