Secrets

secrets

Methods

Create Secret -> { id, account_id, cloud_secret_path, 7 more... }
post/v5/sgp/secrets

Create an account-level secret.

The secret value is stored in the cloud provider's secret store. SGP only stores metadata (key name, description, audit info). The value is never returned by any API. Returns 409 if a secret with the same key already exists.

List Secrets -> CursorPage<{ id, account_id, cloud_secret_path, 7 more... }>
get/v5/sgp/secrets

List secret metadata for the account. Values are never returned.

query Parameters
ending_before: string
Optional
limit: number
Optional
(maximum: 10000, minimum: 1, default: 100)
sort_by: string
Optional
sort_order:
Optional
starting_after: string
Optional
Response fields
has_more: boolean

Whether there are more items left to be fetched.

items: Array<{ id, account_id, cloud_secret_path, 7 more... }>
total: number

The total of items that match the query. This is greater than or equal to the number of items returned.

limit: number
Optional
(default: 100)

The maximum number of items to return.

object: "list"
Optional
(default: "list")
Request example
200Example
Get Secret -> { id, account_id, cloud_secret_path, 7 more... }
get/v5/sgp/secrets/{secret_id}

Get a single secret's metadata by ID. The value is never returned.

Update Secret -> { id, account_id, cloud_secret_path, 7 more... }
patch/v5/sgp/secrets/{secret_id}

Update an existing secret's description and/or value.

If value is provided, the cloud provider secret is updated. The secret value is never returned by any API.

Delete Secret ->
delete/v5/sgp/secrets/{secret_id}

Delete a secret from both the cloud provider and SGP metadata.

Domain types

SecretCreateResponse = { id, account_id, cloud_secret_path, 7 more... }

API response model for a secret. Never includes the secret value.

SecretListResponse = { id, account_id, cloud_secret_path, 7 more... }

API response model for a secret. Never includes the secret value.

SecretRetrieveResponse = { id, account_id, cloud_secret_path, 7 more... }

API response model for a secret. Never includes the secret value.

SecretUpdateResponse = { id, account_id, cloud_secret_path, 7 more... }

API response model for a secret. Never includes the secret value.