v2

latestSwagger 2.0raw.githubusercontent.com2025-09-17107133447.6 KB
Secret

Update a Secret

post/secrets/{id}/update

Path parameters

idstring required

The ID or name of the secret

Query parameters

versioninteger required

The version number of the secret object being updated. This is required to avoid conflicting writes.

Request body

Namestring

User-defined name of the secret.

Labelsobject

User-defined key/value metadata.

Datastring

Data is the data to store as a secret, formatted as a Base64-url-safe-encoded (RFC 4648) string. It must be empty if the Driver field is set, in which case the data is loaded from an external secret store. The maximum allowed size is 500KB, as defined in MaxSecretSize.

This field is only used to create a secret, and is not returned by other endpoints.

Example request

{
  "Labels": {
    "com.example.some-label": "some-value",
    "com.example.some-other-label": "some-other-value"
  },
  "Driver": {
    "Name": "some-driver",
    "Options": {
      "OptionA": "value for driver-specific option A",
      "OptionB": "value for driver-specific option B"
    }
  },
  "Templating": {
    "Name": "some-driver",
    "Options": {
      "OptionA": "value for driver-specific option A",
      "OptionB": "value for driver-specific option B"
    }
  }
}

Response

no error