Set a secret's values: a new revision, rolled out unless `rollout` is false.
const url = 'https://example.com/api/v1/projects/example/environments/example/secrets/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"data":{"additionalProperty":"example"},"rollout":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/projects/example/environments/example/secrets/example \ --header 'Content-Type: application/json' \ --data '{ "data": { "additionalProperty": "example" }, "rollout": true }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
Secret name
Request Bodyrequired
Section titled “Request Bodyrequired”object
Key → UTF-8 value. Replaces the whole secret with a new revision.
object
Roll the new value out to the apps that reference the secret.
Examplegenerated
{ "data": { "additionalProperty": "example" }, "rollout": true}Responses
Section titled “Responses”object
Key names only; values are never returned.
Where a secret’s values are kept.
The current revision of an encrypted secret.
The current revision is revoked: set a new value before deploying.
The runs that roll a new value out, after a change.
One app’s rollout of a new secret value.
object
The rotation run; None when the app could not take one now.
Why there is no run.
Example
{ "storage": "encrypted"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}The environment is being deleted, or the name is a registry login
Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}