/api/v1/system

System-administration endpoints for operating a fylr instance: statistics and status, search-index rebuild, backups, storage locations, share links, sending mail, and wiping the instance (factory reset). Most operations require a system.* right (often system.root).

GET /system/status — System object/index/file statistics.

System object/index/file statistics.

get

Returns counts of stored objects (per objecttype and per basetype), index-queue depth, file processing queue depth and per-index storage sizes. Used by the inspect UI's status page and by external monitoring.

The x-fylr-status response header carries the instance's current lifecycle status word (one of startup, ready, purge, reindex, busy) — not the build / version / capability details.

Requires system.root.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Responses
200

Object, index and file processing statistics. Sets the x-fylr-status response header to the current lifecycle status word (startup, ready, purge, reindex, busy).

application/json

System statistics — per-objecttype and per-basetype object counts, index-queue depth, file processing queues, and per-index storage stats. Returned by GET /system/status.

Build / version / capability information is not in this body — it travels in the x-fylr-status response header, in the form <config>-<instance>-<version> <build_commit> plus per-component flags (use the inspect UI's status page for the rendered view).

total_not_indexedintegerRequired

Sum of objects still waiting in the index queue across all types.

pending_filesintegerRequired

Number of files in the "pending" pipeline state (waiting to be processed by the execserver).

queued_filesintegerRequired

Number of files queued for processing — superset of pending_files that includes retries.

GET /system/errortest — Trigger a test error (for error-handling validation).

Trigger a test error (for error-handling validation).

get

Returns a synthetic error so clients can verify they parse fylr's error envelope correctly. Surfaces under code: Test.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Responses
400

The synthetic error.

GET /system/openapi/spec.json — The OpenAPI specification for the v1 API (JSON).

The OpenAPI specification for the v1 API (JSON).

get

Returns the same JSON spec as /inspect/apidocs/spec/spec.json, mounted under the API surface.

Access requires the system.root right, OR the base config flag system.openapi_spec_endpoint.active to be enabled — in which case the endpoint is reachable without authentication.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Responses
200

The OpenAPI 3.1 document for this fylr instance, as JSON. The body is a full OpenAPI spec — too large to model inline; consume it with an OpenAPI parser.

application/json
anyOptional

No content

POST /system/reindex — Rebuild the search index from scratch.

Rebuild the search index from scratch.

post

Drops the search index into a freshly created one and triggers a full reindexing run. The reindexing work runs asynchronously on the server; the call returns as soon as the run has been started. The frontend can be blocked while the reindex is in progress so users do not see partial results.

This operation performs no rights check in the handler today.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Query parameters
blockFrontendbooleanOptional

If true, fylr serves a maintenance page on the frontend until the reindex completes.

Default: false
Responses
200

The reindexing run was started.

application/json
statusstring · enumRequiredPossible values:
200

The reindexing run was started.

POST /system/purgeall — Wipe and re-initialize the entire instance (factory reset).

Wipe and re-initialize the entire instance (factory reset).

post

Drops the search index, optionally purges file storage (base config system.purge.purge_storage), resets the database to an empty state and re-initializes a fresh instance. This destroys all data — it is not a cleanup of soft-deleted records. Restricted to the system:root user and cannot be undone.

Purging must be enabled in the configuration: both the yml fylr.allowpurge and the base config system.purge.allow_purge must be set, otherwise the call returns code: PurgeNotAllowed.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Query parameters
redirectstringOptional

Optional URL. If set, the server starts the purge in the background and immediately responds with a 302 redirect to this URL instead of waiting for the purge to finish.

set_passwordstringOptional

Optional new password for the system:root user, applied after the instance has been re-initialized.

Responses
200

The purge completed.

application/json
statusstring · enumRequiredPossible values:

PUT /system/backup/new — Create a new backup.

Create a new backup.

put

Starts a new backup of the database, files and configuration. The backup runs asynchronously: the call returns the backup descriptor with a running status immediately, and the archive is produced in the background and stored in the configured backup location. Requires system.backup (or system.root).

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Body

Options the backup was started with. Echoed back on read so clients can tell which format the produced artifact is in.

formatstringRequired

Backup format. The recognised values are configured per instance and surface in GET /api/v1/system/backup/list; typical values include sqlite3_db (single-file SQLite snapshot) and pg_dump (PostgreSQL dump archive).

include_eventsbooleanOptional

When true, the event log is included in the backup. When false, only the datamodel and user data are dumped — useful for migrating to a new instance without carrying the event history along.

Responses
200

The backup descriptor.

application/json

A backup descriptor — a record of a single backup run produced by PUT /api/v1/system/backup/new.

idinteger · int64Required

Server-issued numeric id.

created_atstring · date-timeRequired

UTC time the backup was created.

finished_atstring · date-timeOptional

UTC time the backup completed. Null while the backup is still running.

statusstring · enumRequired

Current backup state — running, done, error.

Possible values:

GET /system/backup/list — List backups on file.

List backups on file.

get

Requires system.backup (or system.root).

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Responses
200

Array of backup descriptors.

application/json

A backup descriptor — a record of a single backup run produced by PUT /api/v1/system/backup/new.

idinteger · int64Required

Server-issued numeric id.

created_atstring · date-timeRequired

UTC time the backup was created.

finished_atstring · date-timeOptional

UTC time the backup completed. Null while the backup is still running.

statusstring · enumRequired

Current backup state — running, done, error.

Possible values:

GET /system/backup/{id} — Retrieve a backup descriptor.

Retrieve a backup descriptor.

get

Requires system.backup (or system.root).

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
idinteger · int64 · min: 1Required
Responses
200

The backup descriptor.

application/json

A backup descriptor — a record of a single backup run produced by PUT /api/v1/system/backup/new.

idinteger · int64Required

Server-issued numeric id.

created_atstring · date-timeRequired

UTC time the backup was created.

finished_atstring · date-timeOptional

UTC time the backup completed. Null while the backup is still running.

statusstring · enumRequired

Current backup state — running, done, error.

Possible values:

DELETE /system/backup/{id} — Delete a backup.

Delete a backup.

delete

Only a backup whose status is done or error can be deleted. Requires system.backup (or system.root).

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
idinteger · int64 · min: 1Required
Responses
200

The backup was deleted.

application/json

GET /system/backup/{id}/download — Download a backup archive.

Download a backup archive.

get

Requires system.backup (or system.root).

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
idinteger · int64 · min: 1Required
Responses
200

The backup bytes.

application/octet-stream
string · binaryOptional

POST /system/location/new — Create a new storage location.

Create a new storage location.

post

Requires system.location (or system.root). The id in the body must be 0 for a create.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Body

A storage location descriptor — an external bucket where fylr reads / writes files. Used by /api/v1/system/location* and surfaced read-only on every file download via the X-Fylr-Storage-Location response header.

idinteger · int64Required

Server-issued numeric id. On create, must be set to the same value that appears in the URL /system/location/{id} (or 0 for POST /system/location/new).

created_atstring · date-timeOptional

UTC time the location was created.

namestringOptional

Human-readable label.

kindstring · enumRequired

Storage driver — file (local disk), s3 (AWS / S3-compatible), or azure (Azure Blob Storage). Selects which config shape (file / s3 / azure) is expected.

Possible values:
prefixstringOptional

Optional bucket prefix — every key written to the location is prepended with it. Usually ends in /.

allow_purgebooleanOptional

Whether POST /api/v1/system/purgeall may delete files from this location. Disable to keep an archival location intact.

allow_redirectbooleanOptional

Whether file downloads from this location may use HTTP Location: redirects (for remote buckets with their own URL signers).

read_onlybooleanOptional

Whether this location accepts writes. If true, new files are sent to the next writable location and only reads come from here.

statusstring · enumOptional

Read-only connection state — connected, not accessible, error, closed.

Possible values:
status_msgstringOptional

Read-only diagnostic message attached to a non-connected status — usually the underlying error from the driver.

Responses
200

The created location.

application/json

A storage location descriptor — an external bucket where fylr reads / writes files. Used by /api/v1/system/location* and surfaced read-only on every file download via the X-Fylr-Storage-Location response header.

idinteger · int64Required

Server-issued numeric id. On create, must be set to the same value that appears in the URL /system/location/{id} (or 0 for POST /system/location/new).

created_atstring · date-timeOptional

UTC time the location was created.

namestringOptional

Human-readable label.

kindstring · enumRequired

Storage driver — file (local disk), s3 (AWS / S3-compatible), or azure (Azure Blob Storage). Selects which config shape (file / s3 / azure) is expected.

Possible values:
prefixstringOptional

Optional bucket prefix — every key written to the location is prepended with it. Usually ends in /.

allow_purgebooleanOptional

Whether POST /api/v1/system/purgeall may delete files from this location. Disable to keep an archival location intact.

allow_redirectbooleanOptional

Whether file downloads from this location may use HTTP Location: redirects (for remote buckets with their own URL signers).

read_onlybooleanOptional

Whether this location accepts writes. If true, new files are sent to the next writable location and only reads come from here.

statusstring · enumOptional

Read-only connection state — connected, not accessible, error, closed.

Possible values:
status_msgstringOptional

Read-only diagnostic message attached to a non-connected status — usually the underlying error from the driver.

GET /system/location/list — List configured storage locations.

List configured storage locations.

get

Requires system.location, system.config, or system.root.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Responses
200

Array of locations.

application/json

A storage location descriptor — an external bucket where fylr reads / writes files. Used by /api/v1/system/location* and surfaced read-only on every file download via the X-Fylr-Storage-Location response header.

idinteger · int64Required

Server-issued numeric id. On create, must be set to the same value that appears in the URL /system/location/{id} (or 0 for POST /system/location/new).

created_atstring · date-timeOptional

UTC time the location was created.

namestringOptional

Human-readable label.

kindstring · enumRequired

Storage driver — file (local disk), s3 (AWS / S3-compatible), or azure (Azure Blob Storage). Selects which config shape (file / s3 / azure) is expected.

Possible values:
prefixstringOptional

Optional bucket prefix — every key written to the location is prepended with it. Usually ends in /.

allow_purgebooleanOptional

Whether POST /api/v1/system/purgeall may delete files from this location. Disable to keep an archival location intact.

allow_redirectbooleanOptional

Whether file downloads from this location may use HTTP Location: redirects (for remote buckets with their own URL signers).

read_onlybooleanOptional

Whether this location accepts writes. If true, new files are sent to the next writable location and only reads come from here.

statusstring · enumOptional

Read-only connection state — connected, not accessible, error, closed.

Possible values:
status_msgstringOptional

Read-only diagnostic message attached to a non-connected status — usually the underlying error from the driver.

GET /system/location/{id} — Retrieve a single storage location.

Retrieve a single storage location.

get

Requires system.location, system.config, or system.root.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
idinteger · int64 · min: 1Required
Responses
200

The location.

application/json

A storage location descriptor — an external bucket where fylr reads / writes files. Used by /api/v1/system/location* and surfaced read-only on every file download via the X-Fylr-Storage-Location response header.

idinteger · int64Required

Server-issued numeric id. On create, must be set to the same value that appears in the URL /system/location/{id} (or 0 for POST /system/location/new).

created_atstring · date-timeOptional

UTC time the location was created.

namestringOptional

Human-readable label.

kindstring · enumRequired

Storage driver — file (local disk), s3 (AWS / S3-compatible), or azure (Azure Blob Storage). Selects which config shape (file / s3 / azure) is expected.

Possible values:
prefixstringOptional

Optional bucket prefix — every key written to the location is prepended with it. Usually ends in /.

allow_purgebooleanOptional

Whether POST /api/v1/system/purgeall may delete files from this location. Disable to keep an archival location intact.

allow_redirectbooleanOptional

Whether file downloads from this location may use HTTP Location: redirects (for remote buckets with their own URL signers).

read_onlybooleanOptional

Whether this location accepts writes. If true, new files are sent to the next writable location and only reads come from here.

statusstring · enumOptional

Read-only connection state — connected, not accessible, error, closed.

Possible values:
status_msgstringOptional

Read-only diagnostic message attached to a non-connected status — usually the underlying error from the driver.

PUT /system/location/{id} — Update a storage location.

Update a storage location.

put

Saves the storage location under the id in the path (an upsert — the body id must equal the path id). Requires system.location (or system.root).

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
idinteger · int64 · min: 1Required
Body

A storage location descriptor — an external bucket where fylr reads / writes files. Used by /api/v1/system/location* and surfaced read-only on every file download via the X-Fylr-Storage-Location response header.

idinteger · int64Required

Server-issued numeric id. On create, must be set to the same value that appears in the URL /system/location/{id} (or 0 for POST /system/location/new).

created_atstring · date-timeOptional

UTC time the location was created.

namestringOptional

Human-readable label.

kindstring · enumRequired

Storage driver — file (local disk), s3 (AWS / S3-compatible), or azure (Azure Blob Storage). Selects which config shape (file / s3 / azure) is expected.

Possible values:
prefixstringOptional

Optional bucket prefix — every key written to the location is prepended with it. Usually ends in /.

allow_purgebooleanOptional

Whether POST /api/v1/system/purgeall may delete files from this location. Disable to keep an archival location intact.

allow_redirectbooleanOptional

Whether file downloads from this location may use HTTP Location: redirects (for remote buckets with their own URL signers).

read_onlybooleanOptional

Whether this location accepts writes. If true, new files are sent to the next writable location and only reads come from here.

statusstring · enumOptional

Read-only connection state — connected, not accessible, error, closed.

Possible values:
status_msgstringOptional

Read-only diagnostic message attached to a non-connected status — usually the underlying error from the driver.

Responses
200

The updated location.

application/json

A storage location descriptor — an external bucket where fylr reads / writes files. Used by /api/v1/system/location* and surfaced read-only on every file download via the X-Fylr-Storage-Location response header.

idinteger · int64Required

Server-issued numeric id. On create, must be set to the same value that appears in the URL /system/location/{id} (or 0 for POST /system/location/new).

created_atstring · date-timeOptional

UTC time the location was created.

namestringOptional

Human-readable label.

kindstring · enumRequired

Storage driver — file (local disk), s3 (AWS / S3-compatible), or azure (Azure Blob Storage). Selects which config shape (file / s3 / azure) is expected.

Possible values:
prefixstringOptional

Optional bucket prefix — every key written to the location is prepended with it. Usually ends in /.

allow_purgebooleanOptional

Whether POST /api/v1/system/purgeall may delete files from this location. Disable to keep an archival location intact.

allow_redirectbooleanOptional

Whether file downloads from this location may use HTTP Location: redirects (for remote buckets with their own URL signers).

read_onlybooleanOptional

Whether this location accepts writes. If true, new files are sent to the next writable location and only reads come from here.

statusstring · enumOptional

Read-only connection state — connected, not accessible, error, closed.

Possible values:
status_msgstringOptional

Read-only diagnostic message attached to a non-connected status — usually the underlying error from the driver.

DELETE /system/location/{id} — Delete a storage location.

Delete a storage location.

delete

Requires system.location (or system.root).

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
idinteger · int64 · min: 1Required
Responses
200

The location was deleted. A delete for an id that is not configured also returns 200 (no row is removed).

application/json

Last updated