Secrets

Create or update a secret

Creates a new secret or updates an existing secret with the same name. The secret value is encrypted at rest.

post/v1/projects/{projectId}/secrets

Request

  • Base URL
    https://api.spice.ai
  • Auth
    HTTP bearer

Path parameters

projectIdinteger required

The ID of the project

Headers

X-Org-Namestring

The organization to act on, by handle. Omit it to act on the organization the credential is bound to; sending it blank is a 400, not the same as omitting it. A user credential may name any organization its owner belongs to; a machine credential is pinned to its own. A portal session token is bound to none, so it must send this header on every route but GET /v1/orgs (400 org_assertion_required otherwise).

Request body

namestring required

Secret name (must start with a letter or underscore, alphanumeric and underscores only)

valuestring required

Secret value (will be encrypted at rest)

Response

Secret created or updated successfully

idinteger

Unique identifier for the secret

namestring

Name of the secret

valuestring

Always masked with asterisks

created_atstring date-time

Timestamp when the secret was created

updated_atstring date-time

Timestamp when the secret was last updated

Changes

No recorded changes to this operation across all 1 revision of this API.