Grant agent secrets
Lets an agent use secrets of its project. A secret it already has keeps its grant. Each takes the caller's own access to the secret (secrets.versions.access). The agent gets no role on it, and keeps its grant if the caller later loses that access. A grant lasts until an owner of the agent removes it with RemoveAgentSecretGrant, or the agent or the secret is deleted. Whoever writes to the agent can then use the secret and read its value.
Lets an agent use secrets of its project. A secret it already has keeps its grant.
Each takes the caller's own access to the secret (secrets.versions.access). The agent gets no role on it, and keeps its grant if the caller later loses that access. A grant lasts until an owner of the agent removes it with RemoveAgentSecretGrant, or the agent or the secret is deleted. Whoever writes to the agent can then use the secret and read its value.
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$agent*stringThe agent's ID.
^ags_[0-7][0-9a-hjkmnp-tv-z]{25}$application/json- body
secrets*array<string>The secrets of the agent's project, as projects/{project_id}/secrets/{secret_id}.
1 <= items <= 100OK
application/json- response
secretGrants*array<>The agent's grants, the oldest first.
curl -X POST 'https://api.kosem.ai/v1/projects/string/agents/string/secretGrants' \
-H 'Content-Type: application/json' \
-d '{
"secrets": [
"string"
]
}'{
"secretGrants": [
{
"createTime": "2019-08-24T14:15:22Z",
"grantor": "string",
"secret": "string"
}
]
}