Stashbase
Secrets

List

List secrets.

GET
/v1/projects/{project_identifier}/environments/{environment_identifier}/secrets/

List secrets.

Path Parameters

project_identifier*string

The name or ID of the project.

environment_identifier*string

The name or ID of the environment.

Query Parameters

only?string

Comma separated list of secret names to return. Cannot be used together with 'exclude'.

exclude?string

Comma separated list of secret names to exclude from the response. Cannot be used together with 'only'.

expand_refs?boolean

Resolve secret references before returning secret values. Requires 'include_value=true'.

include_environment?|

Include environment information in the response. Use 'true' to include all available fields, or provide a comma separated list of fields: 'id', 'name', 'is_production', 'created_at', 'description'.

include_value?boolean

Include decrypted secret values in the response. By default, secret values are not returned.

Defaultfalse
omit?string

Comma separated list of fields to omit from each secret. Available fields: 'comment'. Secret values are controlled separately by 'include_value'.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/projects/string/environments/string/secrets/"
[
  {
    "name": "PORT"
  },
  {
    "name": "DB_HOST"
  },
  {
    "name": "DB_PORT"
  },
  {
    "name": "DB_URL",
    "comment": "The connection string to the database."
  }
]
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}