Batteries

Secrets

The first battery that runs the other way: the other three are things your app does, a secret is something its owner decides. They write, your app reads. Declare the names in saasie.yaml; the values are set by a person and never returned to one.

Every call below goes to the address in your SAASIE_ANALYTICS_URL environment variable, with Authorization: Bearer <token>. Read both from the environment — they are injected, and hardcoding either is how an app breaks when the platform moves. See getting the credential.

GET /v1/secrets

What this app may read, and whether it is set

Names and status, never values. This is the call to make at boot: a secret that is declared and unset is an app that will fail later, and this is the cheapest place to find out.

200 — Every declared secret

FieldType
secrets* object[] —

When it does not work

401Missing or invalid service token
403The Saasie is stopped

GET /v1/secrets/{name}

Read a secret

Fetch it at boot and keep it in memory. The platform does not push a change, so an app that must survive a rotation should refetch on an authentication failure, or poll the list route and compare version — which costs nothing and never moves the value.

200 — The value

FieldType
name* string —
value* string —
version* number —
setAt* number —

When it does not work

400Not a secret name
401Missing or invalid service token
403The Saasie is stopped
404This blueprint does not declare that secret
409Declared, but nobody has set it yet
501This deployment has no secrets battery

Generated from openapi.json, which the service renders from its own routes. * marks a required field. Every error body is { "error": { "code", "message", "details"? } }.