List the secrets of an environment (names and keys).
GET
/api/v1/projects/{project}/environments/{environment}/secrets
const url = 'https://example.com/api/v1/projects/example/environments/example/secrets';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/projects/example/environments/example/secretsParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project
required
string
Project name
environment
required
string
Environment short name
Responses
Section titled “Responses”Media typeapplication/json
Array<object>
object
name
required
string
keys
required
Key names only; values are never returned.
Array<string>
created_at
string | null
storage
required
Where a secret’s values are kept.
string
revision
The current revision of an encrypted secret.
integer | null format: int64
revoked
required
The current revision is revoked: set a new value before deploying.
boolean
updated_at
string | null
rollouts
The runs that roll a new value out, after a change.
Array<object>
One app’s rollout of a new secret value.
object
app
required
string
run
The rotation run; None when the app could not take one now.
string | null format: uuid
approvals_required
required
integer format: int32
skipped
Why there is no run.
string | null
Example
[ { "storage": "encrypted" }]