Docs
Get started

API

Usage

Requests and stored bytes per bucket, and the monthly report as a CSV file.

On this page

The examples use the two shell variables from Authentication:

Shell
export FENVIX_API=https://api.fenvix.dev/v1/public
export FENVIX_KEY="$(read_from_your_secret_store)"   # never written in a command

Usage of the organization#

GET /usage

Works with an admin or a read_only key.

Requests and stored bytes of every database of the organization (or of one, with databaseId), per bucket and in total. Copied from the engine by the usage sync; see the Usage section of the guide for what each number means and how fresh it is.

Shell
curl -sS "$FENVIX_API/usage?range=24h" \
  -H "Authorization: Bearer $FENVIX_KEY"

Parameters#

Name In Required Type Notes
range query yes string (24h, 7d, 30d) 24h: 24 hourly buckets. 7d: 28 six-hourly buckets (UTC 00, 06, 12, 18). 30d: 30 UTC days. The last bucket is the current one.
databaseId query no string Only this database (same answer as GET /databases/{id}/usage).

Answers#

Status Body Meaning
200 Usage The usage.
400 Error Missing or unknown range.
401 Error No key, or the key is not valid, has expired or has been revoked.
404 Error databaseId is not a database of this organization.
429 Error Too many requests. Wait for the number of seconds in Retry-After.

Usage of a database#

GET /databases/{id}/usage

Works with an admin or a read_only key.

Shell
curl -sS "$FENVIX_API/databases/$DATABASE_ID/usage?range=24h" \
  -H "Authorization: Bearer $FENVIX_KEY"

Parameters#

Name In Required Type Notes
id path yes string —
range query yes string (24h, 7d, 30d) 24h: 24 hourly buckets. 7d: 28 six-hourly buckets (UTC 00, 06, 12, 18). 30d: 30 UTC days. The last bucket is the current one.

Answers#

Status Body Meaning
200 Usage The usage. activeDatabases is 0 or 1.
400 Error Missing or unknown range.
401 Error No key, or the key is not valid, has expired or has been revoked.
404 Error No such database in this organization.
429 Error Too many requests. Wait for the number of seconds in Retry-After.

Monthly usage report as CSV#

GET /usage/export

Works with an admin or a read_only key.

The dashboard's monthly report (per database or per tag), as a signed link to a CSV file that works for 15 minutes without a key. The file is built when the link is opened.

Shell
curl -sS "$FENVIX_API/usage/export?month=2026-10&by=database" \
  -H "Authorization: Bearer $FENVIX_KEY"

Parameters#

Name In Required Type Notes
month query yes string YYYY-MM (UTC).
by query yes string (database, tag) —
tagKey query no string With by=tag: one row per value of this tag key (and (none)). Without it: one row per key:value.
sort query no string (name, databases, storageGb, requests) databases only with by=tag. Default requests.
dir query no string (asc, desc) Default desc.

Answers#

Status Body Meaning
200 object The link.
400 Error Bad parameters, or there is no usage for that month.
401 Error No key, or the key is not valid, has expired or has been revoked.
429 Error Too many requests. Wait for the number of seconds in Retry-After.