Skip to content

Serverless

GET /v1/serverless/cron · scope serverless:read

It takes no id: there is one Cron tenant per account. Returns the plan, its limits, how many schedules exist, and the month’s executions. Schedules themselves are managed against the service’s data plane with the tenant token.

Terminal window
curl https://api.truo.cloud/v1/serverless/cron \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.cron.get

POST /v1/serverless/cron/keys/rotate · scope serverless:keys · destructive — cannot be undone · idempotent

Issues a new crt_… token and returns it, exactly once. With grace_seconds the previous token keeps working that long; with 0 (the default) it dies immediately. Schedules keep firing through a rotation — the token only authenticates management.

Terminal window
curl https://api.truo.cloud/v1/serverless/cron/keys/rotate \
-X POST \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.cron.keys.rotate

Get the Cron period’s usage and billable line

Section titled “Get the Cron period’s usage and billable line”

GET /v1/serverless/cron/usage · scope serverless:read

Webhook executions against the plan for the period, the overage, the total in USD, and the daily series. On the free plan, deliveries past the quota are skipped (visible in the execution log) instead of billed.

Terminal window
curl https://api.truo.cloud/v1/serverless/cron/usage \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.cron.usage.get

GET /v1/serverless/db · scope serverless:read

It takes no id: there is one Serverless DB tenant per account. Returns the plan, its limits, the live namespaces and the month’s usage. This is not DBaaS (/v1/databases, managed database VMs): this is the serverless SQL primitive, D1-compatible, one SQLite database per namespace.

Terminal window
curl https://api.truo.cloud/v1/serverless/db \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.db.get

POST /v1/serverless/db/keys/rotate · scope serverless:keys · destructive — cannot be undone · idempotent

Issues a new dbt_… token and returns it, exactly once. With grace_seconds the previous token keeps working that long — rotate with a grace window and redeploy your apps before it closes, or every query they run dies at the instant of rotation.

Terminal window
curl https://api.truo.cloud/v1/serverless/db/keys/rotate \
-X POST \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.db.keys.rotate

Get the DB period’s usage and billable line

Section titled “Get the DB period’s usage and billable line”

GET /v1/serverless/db/usage · scope serverless:read

Rows read/written and the storage peak against the plan for the period, the overage, the total in USD, and the daily series. exec (multi-statement DDL) does not report rows and is not metered, same as D1.

Terminal window
curl https://api.truo.cloud/v1/serverless/db/usage \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.db.usage.get

GET /v1/serverless/functions · scope serverless:read

It takes no id: there is one Functions tenant per account. Returns the plan, its limits, how many functions are deployed, and the month’s invocations. Deploys and invocations go through the service’s data plane, not this API.

Terminal window
curl https://api.truo.cloud/v1/serverless/functions \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.functions.get

POST /v1/serverless/functions/keys/rotate · scope serverless:keys · destructive — cannot be undone · idempotent

Issues a new fnt_… token and returns it, exactly once. With grace_seconds the previous token keeps working that long. Deployed functions keep serving through a rotation — the token only authenticates deploys and management, not the public invocation URLs.

Terminal window
curl https://api.truo.cloud/v1/serverless/functions/keys/rotate \
-X POST \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.functions.keys.rotate

Get the Functions period’s usage and billable line

Section titled “Get the Functions period’s usage and billable line”

GET /v1/serverless/functions/usage · scope serverless:read

Invocations, errors and total execution time against the plan for the period, the overage, the total in USD, and the daily series.

Terminal window
curl https://api.truo.cloud/v1/serverless/functions/usage \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.functions.usage.get

GET /v1/serverless/kv · scope serverless:read

It takes no id: there is one KV tenant per account. Returns the plan, its limits, and the month’s usage. If the account does not have the service, it returns 404.

Terminal window
curl https://api.truo.cloud/v1/serverless/kv \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.kv.get

POST /v1/serverless/kv/keys · scope serverless:keys · reversible · idempotent

Mints a new kvt_… token without invalidating the existing ones — KV is the only primitive that supports several live tokens per tenant (one per app or environment). The token is returned exactly once: only its hash is stored.

It does not work against this API: it authenticates the data plane at {api_endpoint}/v1/ns/…. It requires serverless:keys because holding it is the ability to read, write and bill against the account’s tenant.

Terminal window
curl https://api.truo.cloud/v1/serverless/kv/keys \
-X POST \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.kv.keys.create

POST /v1/serverless/kv/keys/rotate · scope serverless:keys · destructive — cannot be undone · idempotent

Issues a new token and returns it. All previous tokens of the tenant are affected: with grace_seconds they keep working that long; with 0 (the default) they die immediately. There is no going back.

Terminal window
curl https://api.truo.cloud/v1/serverless/kv/keys/rotate \
-X POST \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.kv.keys.rotate

Get the KV period’s usage and billable line

Section titled “Get the KV period’s usage and billable line”

GET /v1/serverless/kv/usage · scope serverless:read

Reads, writes and the storage peak against the plan for the period, the overage, the total in USD, and the daily series. On a hard-capped plan (included.hard_cap) the overage is never billed: the service stops at the quota instead.

Terminal window
curl https://api.truo.cloud/v1/serverless/kv/usage \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: serverless.kv.usage.get