display_value.
Permissions: reading collections needs
org.view_variable_collections. Owners and admins (org.manage_variable_collections) can create and change any collection. Members (org.create_variable_collections) can create collections owned by a workspace they belong to, except the default workspace, and change any collection their workspaces own, whoever created it. A workflow’s variables and attached collections need workflow.manage_variables.
A variable
PATCH changes only what you send. Changing a key or value of a secret never reveals the old value.
Secrets and agentsAn agent can set a secret if you give it the value, but the value then passes through the conversation. Prefer entering secret values in Bentra.
Collections
GET variable-collections/
Owners and admins see every collection. Everyone else sees the ones usable in a workspace they belong to: owned by it, shared with it, or shared with every workspace. ?workspace=<slug> narrows the list to the collections that workspace’s workflows can attach. Paginated.
workspace owns the collection; its members manage it. visibility is this_workspace, selected_workspaces (the ones in shared_with) or all_workspaces. Shared workspaces can attach it but not change it.
GET variable-collections/{id}/
The collection plus variables.
POST variable-collections/
{"workspace": "platform", "name": "AWS prod", "description": "…", "visibility": "selected_workspaces", "workspaces": ["data"]} → 201. workspace is the owning workspace; visibility (default this_workspace) and workspaces are optional. 403 if you can’t create collections there. 502 if secret storage is unavailable.
PATCH variable-collections/{id}/
{"name": "…", "description": "…"}.
DELETE variable-collections/{id}/
Deletes the collection, its variables and their secrets, and detaches it from workflows. Returns 204.
PATCH variable-collections/{id}/sharing/
{"workspace": "platform", "visibility": "selected_workspaces", "workspaces": ["data", "ml"]}, every field optional.
workspacemoves the collection. A member must belong to both workspaces, and neither can be the default workspace. The old workspace stays shared while its workflows have the collection attached.workspacesreplaces the shared list;[]stops sharing. Only owners and admins can useall_workspacesor share with the default workspace. When a member saves, workspaces they can’t manage stay on the list.- Returns
409withblocking_workflows(slug,name,workspace) when a workflow in a workspace that would lose access still has the collection attached. Nothing changes.
A workflow’s variables
GET workflows/{id}/variables/
collections is in precedence order: later ones override earlier ones, and the workflow’s own variables override them all.
overrides lists every key defined in more than one place, sorted by key: used is the definition a run gets, overridden the ones it ignores (nearest first). type is collection or workflow. Only keys are compared; no values are read. A run decrypts only the used definitions, so a broken overridden secret never fails it.
POST workflows/{id}/variable-collections/
{"collection_id": "…"} attaches a collection usable in the workflow’s workspace (its own, one shared with it, or one shared with every workspace), after the existing ones. 404 if it isn’t usable there; 409 if already attached.