Skip to content
Navigation

attachSecret

PUT
/api/v1/agents/{agentId}/secrets/{secretId}

Attach a secret (agent admin; the secret's owner or a workspace admin). Injection works immediately; a changed environment variable needs a rebuild.

Authorization

  • session
    optional
    API key in cookie
  • token
    optional
    HTTP Bearer

    Authorization: Bearer <token>

Path parameters

  • agentId
    string
    required
  • secretId
    string
    required

Request body JSON required

  • envVar
    optional
    string

    Variable that holds the placeholder in the sandbox.

Returns

200

Attached.

JSON
  • secret
    object
    required
    • id
      string
      required
    • workspaceId
      string
      required
    • name
      string
      required
    • rule
      object
      required
      • hosts
        array of
        string
        required

        Exact host names or "*.example.com".

      • header
        string
        required
      • template
        string
        required

        Header value; {{.Value}} is the secret. Function: base64.

    • placeholder
      string
      required

      What sandboxes see instead of the value.

    • owner
      object
      required
      • id
        string
        required
      • email
        string
        required
      • name
        string
        required
      • avatarUrl
        string
        required
    • canManage
      boolean
      required
    • createdAt
      string
      required
      format: date-time
    • updatedAt
      string
      required
      format: date-time
  • envVar
    string
    required

400

Error.
JSON
  • error
    string
    required

403

Error.
JSON
  • error
    string
    required

404

Error.
JSON
  • error
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close