Skip to Content
REST APIAgent Secrets API

Agent Secrets API

List all agent secrets of the environment

PathMethodProtected
/v1/envs/{environment_id}/agent-secretsGETYes

Example Response JSON

{ "values": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "path": [ "string" ], "revision": 0, "secretType": { "defs": [ { "id": "string", "name": "string", "body": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } } ], "root": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } }, "secretValue": { "kind": "bool", "value": true } } ] }

Create a new agent secret

PathMethodProtected
/v1/envs/{environment_id}/agent-secretsPOSTYes

Example Request JSON

{ "path": [ "string" ], "secretType": { "defs": [ { "id": "string", "name": "string", "body": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } } ], "root": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } }, "secretValue": { "kind": "bool", "value": true } }

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "path": [ "string" ], "revision": 0, "secretType": { "defs": [ { "id": "string", "name": "string", "body": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } } ], "root": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } }, "secretValue": { "kind": "bool", "value": true } }

Get an agent secret in an environment by its path segments.

PathMethodProtected
/v1/envs/{environment_id}/agent-secrets/by-pathGETYes

Query Parameters

NameTypeRequiredDescription
patharrayYes-

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "path": [ "string" ], "revision": 0, "secretType": { "defs": [ { "id": "string", "name": "string", "body": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } } ], "root": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } }, "secretValue": { "kind": "bool", "value": true } }

Get agent secret by id.

PathMethodProtected
/v1/agent-secrets/{agent_secret_id}GETYes

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "path": [ "string" ], "revision": 0, "secretType": { "defs": [ { "id": "string", "name": "string", "body": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } } ], "root": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } }, "secretValue": { "kind": "bool", "value": true } }

Update agent secret

PathMethodProtected
/v1/agent-secrets/{agent_secret_id}PATCHYes

Example Request JSON

{ "currentRevision": 0, "secretValue": { "op": "set", "value": { "kind": "bool", "value": true } } }

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "path": [ "string" ], "revision": 0, "secretType": { "defs": [ { "id": "string", "name": "string", "body": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } } ], "root": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } }, "secretValue": { "kind": "bool", "value": true } }

Delete agent secret

PathMethodProtected
/v1/agent-secret/{agent_secret_id}DELETEYes

Query Parameters

NameTypeRequiredDescription
current_revisionintegerYes-

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "path": [ "string" ], "revision": 0, "secretType": { "defs": [ { "id": "string", "name": "string", "body": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } } ], "root": { "kind": "ref", "value": { "id": "string", "metadata": { "doc": "string", "aliases": [ "string" ], "examples": [ "string" ], "deprecated": "string", "role": { "tag": "multimodal" } } } } }, "secretValue": { "kind": "bool", "value": true } }

Agent Secrets API Errors

Status CodeDescriptionBody
400Invalid request, returning with a list of issues detected in the request{"code":"string","errors":["string"]}
401Unauthorized request{"code":"string","error":"string"}
403Forbidden Request{"code":"string","error":"string"}
404Entity not found{"code":"string","error":"string"}
409{"code":"string","error":"string"}
422Limits of the plan exceeded{"code":"string","error":"string"}
500Internal server error{"code":"string","error":"string"}