Builds

Get workspace build secrets

Changed on

Lists the metadata of the secrets linked to a workspace build, including secrets whose values a later build cleared. Values are never returned. env_replaces and file_replaces name the workspace owner's user secrets that each live secret displaces, and are omitted when the caller cannot read those user secrets.

get/api/v2/workspacebuilds/{workspacebuild}/secrets

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/workspacebuilds/{workspacebuild}/secrets
  • Auth
    API key in header Coder-Session-Token

Path parameters

workspacebuildstring uuid required

Workspace build ID

Response

OK

cleared_atstring date-time

ClearedAt is set once a later build superseded the secret and its value was dropped. Cleared secrets are not delivered and replace nothing.

created_atstring date-time
descriptionstring
enabledboolean

Enabled controls whether the secret is injected into workspaces. Disabled secrets remain visible and editable, but are not added to the agent manifest, so they are not exposed as environment variables or written to secret files.

env_namestring
env_replacesstring uuid

EnvReplaces is the ID of the workspace owner's user secret that this secret displaces on env_name.

ephemeralboolean

Ephemeral secrets are delivered to their build only and not copied to the next one.

file_pathstring
file_replacesstring uuid

FileReplaces is the ID of the workspace owner's user secret that this secret displaces on file_path.

idstring uuid
namestring
updated_atstring date-time
workspace_build_idstring uuid

Changes