Skip to Content
OpenETL
ReferenceAPISecret Service

Update secret

Sets a secret's value or reference. The next sync, check or discover that uses it gets the new value.

PATCH
/v1/workspaces/{workspace}/secrets/{secret}

Sets a secret's value or reference. The next sync, check or discover that uses it gets the new value.

Path Parameters

workspace*string

The workspace id.

secret*string

The secret id.

Query Parameters

allowMissing?boolean

Create the secret if it doesn't exist.

Request Body

application/json
  1. body
name?string

workspaces/{workspace}/secrets/{secret}

value?string

Input only: at most 64 KiB of UTF-8. Set this or ref.

etag?string

On input, if set, it must match.

createTime?string
Formatdate-time
updateTime?string
Formatdate-time
usedBy?array<string>

Output only: the sources and destinations whose configs name it.

ref?string

Where runners read the value, instead of a value stored here: aws-sm://{name or ARN}[?region=…][&version=…][&stage=…][&field=…] gcp-sm://projects/{p}/[locations/{l}/]secrets/{s}[/versions/{v}][?field=…] azure-kv://{vault}/{name}[?version=…][&field=…] field picks a top-level field of a JSON object value. Runners read it for each attempt, check and discover.

Response Body

OK

application/json
  1. response
secret?
created?boolean

The secret didn't exist.

Example Request
curl -X PATCH 'http://localhost:8080/v1/workspaces/string/secrets/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "secret": {    "name": "string",    "value": "string",    "etag": "string",    "createTime": "2019-08-24T14:15:22Z",    "updateTime": "2019-08-24T14:15:22Z",    "usedBy": [      "string"    ],    "ref": "string"  },  "created": true}