Skip to content

Storage API ​

25 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.

Endpoints ​

GET /api/v1/admin/recovery/status ​

Disaster-recovery journal status

State of the row journal behind openartifact rebuild: how many changed package rows still wait for their sidecar blob, how old the oldest is, the last failure and the progress of the backfill reconcile (admin only)

Responses

StatusDescriptionBody
200Journal statusapplication/json: RecoveryStatus
403Admin access required-

GET /api/v1/admin/storage ​

List storage backends

List the storage backends stored in the database (items) and the primary store the server is configured with (primary, read-only; absent when none is wired). The primary store is not part of items or total. Its status comes from a health check cached for 10 seconds.

Responses

StatusDescriptionBody
200List of storage backendsapplication/json: object
403Admin access required-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
itemsarray of StorageBackendno-
primaryStoragePrimaryno-
totalintegerno-

POST /api/v1/admin/storage ​

Create storage backend

Create a new storage backend (admin only). The names "primary" and "replication" are reserved (they are static paths under /admin/storage): creating one answers 400

Request body (required)

application/json: object

FieldTypeRequiredDescription
configobjectno-
kindstringyesOne of: filesystem, s3, gcs, azure.
namestringyes-

Responses

StatusDescriptionBody
201Storage backend createdapplication/json: StorageBackend
400Invalid requestapplication/json: Error
403Admin access required-

GET /api/v1/admin/storage/primary ​

Get the primary storage

The primary blob store the server is configured with (storage.* settings), with its non-secret location, live status and usage (admin only). The name "primary" is reserved: this static path takes precedence over /admin/storage/{name}.

Responses

StatusDescriptionBody
200The primary storageapplication/json: StoragePrimary
403Admin access required-
404No primary storage is wired-

PATCH /api/v1/admin/storage/primary ​

Update the primary storage (not allowed)

Always answers 405 read_only: the primary storage is set by the server configuration.

Responses

StatusDescriptionBody
403Admin access required-
405read_onlyapplication/json: Error

DELETE /api/v1/admin/storage/primary ​

Delete the primary storage (not allowed)

Always answers 405 read_only: the primary storage is set by the server configuration.

Responses

StatusDescriptionBody
403Admin access required-
405read_onlyapplication/json: Error

POST /api/v1/admin/storage/primary/test ​

Test the primary storage

Runs a live health check through the store that serves every request and refreshes the cached status (admin only).

Responses

StatusDescriptionBody
200Test resultapplication/json: object
403Admin access required-
404No primary storage is wired-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
errorstringno-
messagestringno-
okbooleanno-

GET /api/v1/admin/storage/replication ​

Blob replication status

Backlog, lag, totals and the last verify pass of the replication to storage.replica (admin only). Reports enabled=false when no replica is configured. This static path takes precedence over /admin/storage/{name}.

Responses

StatusDescriptionBody
200Replication statusapplication/json: ReplicationStatus
403Admin access required-

POST /api/v1/admin/storage/replication/verify ​

Verify the replica now

Requests a verify pass that compares the primary store with the replica and repairs differences in either direction; it runs in the background on the replica holding the verify lock (admin only)

Responses

StatusDescriptionBody
202Pass requestedapplication/json: object
403Admin access required-
404Blob replication is not configured-
409A verify pass is already running or requested-

Fields of the 202 response (application/json):

FieldTypeRequiredDescription
requestedbooleanno-

GET /api/v1/admin/storage/{name} ​

Get storage backend

Get details of a specific storage backend (admin only)

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
200Storage backend detailsapplication/json: StorageBackend
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Storage backend not found-

PATCH /api/v1/admin/storage/{name} ​

Update storage backend

Update a storage backend (admin only). Renaming it to "primary" or "replication" answers 400. The name "primary" answers 405 read_only unless a record of that name still exists from before it was reserved, which this then renames. Changing kind or config is refused with 409 while the backend holds blobs, serves a tier or is named by a tier move

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
configobjectno-

Responses

StatusDescriptionBody
200Storage backend updatedapplication/json: StorageBackend
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404Storage backend not found-
405The name is the reserved primary storage, which is set by the server configuration and read-only (error code read_only)application/json: Error
409The kind or config cannot change while the backend holds blobs, serves a tier or is named by a tier move-

DELETE /api/v1/admin/storage/{name} ​

Delete storage backend

Delete a storage backend (admin only)

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
204Storage backend deleted-
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404Storage backend not found-
405The name is the reserved primary storage, which is set by the server configuration and read-only (error code read_only)application/json: Error

POST /api/v1/admin/storage/{name}/test ​

Test storage backend

Test connection to a storage backend (admin only)

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
200Test resultapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
404Storage backend not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
errorstringno-
messagestringno-
okbooleanno-

POST /api/v1/admin/tiering/dry-run ​

Simulate storage policies

Reports what a mover pass would move now (counts, bytes, per route and policy, and a sample) without changing anything. With policy set only that draft is simulated; otherwise every enabled policy and promote-on-read are (admin only)

Request body (required)

application/json: object

FieldTypeRequiredDescription
policyStoragePolicyInputno-
sample_limitintegernoBetween 0 and 200; default 200.

Responses

StatusDescriptionBody
200Simulation resultapplication/json: TierDryRun
400Invalid request-
403Admin access required-

GET /api/v1/admin/tiering/policies ​

List storage policies

Lists lifecycle policies in evaluation order (admin only)

Responses

StatusDescriptionBody
200List of policiesapplication/json: object
403Admin access required-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
itemsarray of StoragePolicyno-
totalintegerno-

POST /api/v1/admin/tiering/policies ​

Create storage policy

Creates a lifecycle policy; the first enabled policy matching a blob decides its tier (admin only)

Request body (required)

application/json: StoragePolicyInput

Responses

StatusDescriptionBody
201Policy createdapplication/json: StoragePolicy
400Invalid request-
403Admin access required-
409Name already used-

GET /api/v1/admin/tiering/policies/{id} ​

Get storage policy

Gets a lifecycle policy (admin only)

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
200Policyapplication/json: StoragePolicy
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Admin access required-
404Storage policy not found-

PUT /api/v1/admin/tiering/policies/{id} ​

Replace storage policy

Replaces every field of a lifecycle policy (admin only)

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Request body (required)

application/json: StoragePolicyInput

Responses

StatusDescriptionBody
200Policy updatedapplication/json: StoragePolicy
400Invalid request-
403Admin access required-
404Storage policy not found-
409Name already used-

DELETE /api/v1/admin/tiering/policies/{id} ​

Delete storage policy

Deletes a lifecycle policy; blobs already moved stay where they are (admin only)

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
204Policy deleted-
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Admin access required-
404Storage policy not found-

POST /api/v1/admin/tiering/run ​

Run the tier mover now

Queues an immediate mover pass on the replica holding the mover lock (admin only)

Responses

StatusDescriptionBody
202Pass requestedapplication/json: object
403Admin access required-
409The mover is disabled-

Fields of the 202 response (application/json):

FieldTypeRequiredDescription
startedbooleannoFalse when a pass was already running.

GET /api/v1/admin/tiering/status ​

Tier mover status

State of the background mover and the moves still in its crash-recovery journal (admin only)

Responses

StatusDescriptionBody
200Mover statusapplication/json: TierMoverStatus
403Admin access required-

GET /api/v1/admin/tiering/tiers ​

List storage tiers

Lists the storage tiers (hottest first) with their placement: blob count and bytes per tier (admin only)

Responses

StatusDescriptionBody
200List of tiersapplication/json: object
403Admin access required-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
itemsarray of StorageTierno-
totalintegerno-

POST /api/v1/admin/tiering/tiers ​

Create storage tier

Maps an existing storage backend to a named tier (admin only)

Request body (required)

application/json: object

FieldTypeRequiredDescription
backendstringyesName of an existing storage backend.
namestringyes-
promote_on_readbooleanno-
rankintegernoPosition from hot (low) to cold (high); defaults to after the last tier.

Responses

StatusDescriptionBody
201Tier createdapplication/json: StorageTier
400Invalid request-
403Admin access required-
409Name or backend already used by a tier-

PATCH /api/v1/admin/tiering/tiers/{name} ​

Update storage tier

Renames a tier or changes its rank or promote-on-read flag (admin only)

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
namestringno-
promote_on_readbooleanno-
rankintegerno-

Responses

StatusDescriptionBody
200Tier updatedapplication/json: StorageTier
400Invalid request-
403Admin access required-
404Storage tier not found-
409Name already used-

DELETE /api/v1/admin/tiering/tiers/{name} ​

Delete storage tier

Deletes a tier that holds no blobs and is not referenced by a policy; the primary tier cannot be deleted (admin only)

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
204Tier deleted-
400The primary tier cannot be deleted-
403Admin access required-
404Storage tier not found-
409Tier still holds blobs, has moves in progress or is used by a policy-

Free software under the AGPL-3.0-or-later.