Endpoint Reference
All endpoints below are relative to https://store.example.com/api/v1 and require Authorization: Bearer <key>, except /healthz. Read the API Overview for conventions, errors and pagination.
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /healthz | none | Health probe |
| GET | /info | ro | Server, key and limits |
| GET | /objects | ro | List a directory |
| POST | /objects | rw | Create from inline content |
| GET | /objects/{path} | ro | Object metadata |
| PATCH | /objects/{path} | rw | Change metadata |
| DELETE | /objects/{path} | rw / admin | Delete to trash or purge |
| PUT | /content/{path} | rw | Streaming upload |
| GET | /content/{path} | ro | Download |
| POST | /move | rw | Rename or move |
| GET | /trash | rw | List the trash |
| DELETE | /trash | admin | Purge many entries |
| DELETE | /trash/{id} | admin | Purge one entry |
| POST | /trash/{id}/restore | rw | Restore an entry |
| POST | /links | rw | Create a signed link |
| GET | /links | rw | List signed links |
| DELETE | /links/{id} | rw | Revoke a link |
| GET | /dirs | ro | List directory policies |
| GET | /dirs/{prefix} | ro | Effective policy |
| PUT | /dirs/{prefix} | rw | Replace a policy |
| PATCH | /dirs/{prefix} | rw | Patch a policy |
| DELETE | /dirs/{prefix} | rw | Remove a policy |
Health and info
/healthzno authOutside /api/v1. Returns 200 {"status":"ok"} when the database responds and the storage backend is usable, otherwise 503.
/api/v1/inforoServer version, API major version, public URL, the authenticated key and limits. Used by clients to verify keys and compatibility.
{
"server_version": "v0.9.0",
"api_version": 1,
"public_url": "https://store.example.com",
"key": { "id": "7apjsr2yg5", "name": "laptop", "scope": "admin", "prefix": "" },
"limits": { "max_upload_bytes": 2147483648, "max_create_bytes": 1048576, "link_default_ttl": "24h", "link_max_ttl": "720h" },
"features": { "symlinks": true }
}
features lists optional capabilities, so clients can tell whether the server supports them; servers before 0.4 omit it.
Objects
The Object
{
"id": "01m4tscd50ry5wfktp4mx4r7c4",
"path": "docs/math/q1/test.pdf",
"name": "test.pdf",
"kind": "file",
"size": 482193,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"content_type": "application/pdf",
"disposition": "inline",
"visibility": "public",
"effective_visibility": "public",
"target": null,
"title": "Q1 test",
"description": "Variant 2",
"tags": ["math", "q1"],
"created_at": "2026-10-10T12:00:00Z",
"updated_at": "2026-10-10T12:05:00Z",
"expires_at": null,
"expired": false,
"revision": 3,
"url": "https://store.example.com/docs/math/q1/test.pdf"
}
url is null for objects that are effectively private. expired is true when expires_at has passed but the janitor has not yet moved the object to the trash.
kind is file or symlink. For a file, effective_visibility equals visibility and target is null. A symlink takes size, sha256 and content_type from its target and describes it in target:
{
"id": "01m681p7md3wwjakx448aq63as",
"path": "sorted/travel/lisbon.jpg",
"kind": "symlink",
"size": 2400000,
"content_type": "image/jpeg",
"visibility": "public",
"effective_visibility": "public",
"target": {
"id": "01m681nrynpc3ztm580zxx94kc",
"path": "originals/2026/lisbon.jpg",
"state": "ok",
"visibility": "public",
"expired": false
},
"…": "…"
}
effective_visibilityis the stricter of the symlink's and the target's visibility, andprivatefor a broken symlink.target.stateisok,trashed(the target is in the trash;pathis its original path) orgone(purged, or outside the key's prefix;pathisnull).target.visibilityisnullunless the target is alive.- A broken symlink reports
size: 0,sha256: ""andcontent_type: "".
/api/v1/objectsroprefixquery, stringDirectory to list, ending in /; empty for the root.
recursivequery, booldefault falseNon-recursive returns immediate children: objects plus dirs (common prefixes). Recursive returns all objects below and an empty dirs.
visibilityquery, comma-separatedFilter by effective visibility, e.g. public,unlisted.
tagquery, repeatableTag filter. Each value is a comma-separated group of tags an object must all have; groups are OR-ed: ?tag=math,draft&tag=q1 means “(math and draft) or q1”. At most 32 groups; an empty group or invalid tag is 400. Symlinks match by their own tags. Non-recursive listings return only dirs that contain matches.
kindquery, file | symlinkOnly files or only symlinks.
brokenquery, boolOnly broken symlinks; implies kind=symlink.
targetquery, pathOnly symlinks pointing at the object at this path. The path must be inside the key's prefix; an unknown path gives an empty list.
limitquery, 1–1000default 200Page size.
cursorquery, opaqueFrom the previous page's next_cursor.
{
"prefix": "docs/",
"dirs": ["docs/math/", "docs/physics/"],
"objects": [ { "id": "…", "path": "docs/readme.md", "…": "…" } ],
"next_cursor": ""
}
A prefix-restricted key listing an ancestor gets a view narrowed to its subtree; an unrelated prefix is 403. Filters only narrow the result and never change prefix checks.
/api/v1/objectsrwCreate a new small object from inline content. Never overwrites; decoded size ≤ VELA_MAX_CREATE.
{
"path": "notes/todo.md",
"content": "# hello\n",
"encoding": "utf-8",
"content_type": "text/markdown",
"visibility": "unlisted",
"title": "",
"description": "",
"tags": [],
"disposition": "inline",
"expires_at": null
}
Only path and content are required. encoding is utf-8 (default) or base64 for binary data. Responds 201 with the Object and a Location header. Errors: 409 already_exists, 409 path_conflict, 409 is_symlink, 413, 415 unsupported_encoding. Not retried automatically by clients.
/api/v1/objects/{path}roReturns the Object with ETag: "r<revision>".
/api/v1/objects/{path}rwJSON Merge Patch (RFC 7396) of metadata. Allowed fields: visibility, title, description, tags, content_type, disposition, expires_at. null resets a field to its default (expires_at: null removes the expiry; content_type: null re-detects). The path cannot be changed here — use move. On a symlink, content_type is rejected with 400 and the target cannot be changed — use POST /symlinks. Optional If-Match: "r<rev>". Responds 200 with the Object.
curl -X PATCH https://store.example.com/api/v1/objects/docs/report.pdf \
-H "Authorization: Bearer $VELA_KEY" -H 'If-Match: "r3"' \
-d '{"visibility": "private", "tags": ["final"], "expires_at": "2026-12-31T00:00:00Z"}'
/api/v1/objects/{path}rwrecursivequery, boolRequired to delete a directory (path ending in /). Deleting the whole root recursively is rejected.
purgequery, boolDelete permanently instead of moving to the trash. Requires admin.
If-MatchheaderSupported for single objects.
{ "deleted": 3, "trash_ids": ["01m4tsckh38p9w9qrhawdsjxge", "…"], "symlinks_affected": 1 }
Deleting a directory path without recursive returns 400 with a hint. symlinks_affected counts the live symlinks, within the key's prefix, that the deletion left broken.
Content
/api/v1/content/{path}rwStreaming upload. The body is the raw file — not multipart. Metadata travels in headers:
| Header | Value |
|---|---|
Content-Type | MIME type; absent or application/octet-stream means “detect” |
Content-Length | Recommended, so the limit is checked before reading. Chunked bodies are checked while streaming. |
X-Vela-Visibility | public, unlisted or private |
X-Vela-Title, X-Vela-Description | Percent-encoded UTF-8 |
X-Vela-Tags | Comma-separated |
X-Vela-Disposition | inline or attachment |
X-Vela-Expires-At | RFC 3339 time, or none to clear |
X-Vela-SHA256 | Hex digest; a mismatch fails with 400 checksum_mismatch |
If-None-Match: * | Create only; if the object exists → 409 already_exists |
If-Match: "r<rev>" | Overwrite only that revision → otherwise 412 |
- No object at the path → created,
201withLocation. - Object exists and no
If-None-Match→ content is overwritten,200. The ID, signed links and metadata not given in headers are kept;revisionincreases; the content type is re-detected unless sent. - The proxy must stream the body (
proxy_request_buffering offin nginx).
curl -X PUT "https://store.example.com/api/v1/content/docs/q3/report.pdf" \
-H "Authorization: Bearer $VELA_KEY" \
-H "Content-Type: application/pdf" \
-H "X-Vela-Visibility: public" \
-H "X-Vela-Title: Q3%20report" \
-H "X-Vela-Tags: finance,q3" \
-H "X-Vela-SHA256: $(sha256sum report.pdf | cut -d' ' -f1)" \
-H "If-None-Match: *" \
--data-binary @report.pdf
/api/v1/content/{path}roDownloads content of any visibility within the key's scope and prefix. Supports HEAD, Range, If-None-Match and If-Range against the ETag: "sha256:<hex>". Responses are Cache-Control: private, no-store with Referrer-Policy: no-referrer and X-Robots-Tag: noindex, nofollow. Expired-but-not-yet-trashed objects can still be downloaded here.
curl -fsSL -H "Authorization: Bearer $VELA_KEY" \
https://store.example.com/api/v1/content/docs/q3/report.pdf -o report.pdf
Moving
/api/v1/moverw{ "from": "docs/math/", "to": "archive/math/", "overwrite": false, "recursive": true }
- Single object:
fromandtoare object paths. Iftoexists:409withoutoverwrite; with it, the existing object goes to the trash first. - Recursive:
recursive: truewith prefixes ending in/. Everything moves in one transaction. Any conflict withoutoverwrite→409withdetails.conflicts(up to 100 paths) and nothing changes. - Directory policies under the source prefix move too; conflicting target policies →
409 conflictwithdetails.conflicting_policies. Withoverwrite, the target's whole policy set is replaced. - Moving a prefix into itself (
a/→a/b/) →400. - Both source and target must be inside the key's prefix.
{ "moved": 12, "policies_moved": 1 }
Signed links and symlinks keep working; public URLs change. Not retried automatically.
Symlinks
/api/v1/symlinksrwCreate a symlink, retarget an existing one, or link a whole directory.
{
"source": "originals/2026/lisbon.jpg",
"path": "sorted/travel/lisbon.jpg",
"recursive": false,
"overwrite": false,
"copy_meta": null,
"visibility": null,
"title": null,
"description": null,
"tags": null,
"disposition": null,
"expires_at": null
}
- Only
sourceandpathare required. A symlink assourceis followed: the new symlink points at the same file. A broken one is 404; a directory withoutrecursiveis 400. copy_metadefaults totruefor new symlinks —title,description,tags,dispositionandvisibilityare copied from the source — and tofalsewhen retargeting. Explicit fields override both;expires_atis never copied.- An occupied
pathis409 already_existswithoutoverwrite. With it, a symlink is retargeted in place (same ID,revision+ 1) and answers200; a file goes to the trash and a new symlink answers201. - The key's prefix must cover both
pathand the source, otherwise 403. - Recursive:
recursive: truewith prefixes ending in/. Every file belowsourceis linked in one transaction; any conflict →409withdetails.conflicts(up to 100 paths) and nothing is created. At most 10 000 objects;pathcannot lie insidesource. Responds200with{"created": 4, "replaced": 0, "skipped": []}, whereskippedlists broken symlinks below the source (up to 100).
Single requests respond with the Object. Errors: 400 invalid_request, 400 invalid_path, 403 forbidden, 404 not_found, 409 already_exists, 409 path_conflict. Not retried automatically.
Trash
/api/v1/trashrwQuery: prefix (directory of original paths), path (exact original path), tag (as in listings, by the tags of the deleted object), limit, cursor. Newest first.
{
"entries": [
{
"id": "01m4tsckh38p9w9qrhawdsjxge",
"original_path": "docs/welcome.txt",
"deleted_at": "2026-10-13T14:06:45Z",
"purge_at": "2026-10-27T14:06:45Z",
"object": { "id": "01m4tscd4ww7p2wjb12mqch87r", "path": "docs/welcome.txt", "…": "…" }
}
],
"next_cursor": ""
}
/api/v1/trash/{id}/restorerw{ "path": "docs/recovered.txt", "overwrite": false }
Both fields are optional; without path the original path is used. Restores the same object ID, so signed links work again. A past expires_at is cleared. Path conflict → 409; overwrite trashes the occupying object. Responds 200 with the Object.
/api/v1/trash/{id}adminPermanently deletes one entry and its link records. 204. Symlinks to a purged file stay broken for good.
/api/v1/trashadminQuery older_than (duration, e.g. 7d) purges entries deleted longer ago; without it, the whole trash is emptied. Responds {"purged": 5, "symlinks_affected": 0}, counting the symlinks within the key's prefix that the purge left without a target.
Signed links
The Link
{
"id": "01m4tsckgbtmyv138s621gqfrv",
"object_id": "01m4tscd50ry5wfktp4mx4r7c4",
"path": "private/report.md",
"url": "https://store.example.com/s/01m4tsckgbtmyv138s621gqfrv/report.md?exp=1791907605&sig=Cya5rfe7e1leFOi6g6vzIQ",
"created_at": "2026-10-13T14:06:45Z",
"expires_at": "2026-10-13T16:06:45Z",
"revoked_at": null,
"note": "for the reviewer"
}
path is empty while the object is trashed or deleted; url is null if the signing key was destroyed.
/api/v1/linksrw{ "path": "private/report.md", "ttl": "2h", "note": "for the reviewer" }
Use ttl or an absolute expires_at; without either, VELA_LINK_DEFAULT_TTL applies. Lifetimes above VELA_LINK_MAX_TTL fail with 400 invalid_request and details.max_ttl. Responds 201 with the Link.
/api/v1/linksrwQuery: path, include_expired (bool), include_revoked (bool). Responds {"links": [ … ]}, newest first, with working URLs — hence the rw requirement.
/api/v1/links/{id}rwRevokes immediately. 204.
Directory policies
The EffectiveDir
{
"prefix": "docs/",
"rule": {
"prefix": "docs/", "index": "on", "hidden": false, "noindex": "inherit",
"title": "Documentation", "description": "Public handbooks",
"created_at": "2026-10-13T14:06:52Z", "updated_at": "2026-10-13T14:07:01Z", "revision": 2
},
"effective": {
"index": "on", "index_source": "docs/",
"hidden": false,
"noindex": "off", "noindex_source": "default",
"title": "Documentation", "description": "Public handbooks"
},
"exists": true,
"url": "https://store.example.com/docs/",
"listed_in_parent": true
}
rule is null when no rule is stored. url is null when the index would return 404. listed_in_parent reflects index enablement, hidden state, visible content and the parent's index. Sources can name ancestors outside the key's prefix.
/api/v1/dirsroQuery: prefix, recursive (default true; non-recursive returns the prefix's own rule and immediate child rules), orphaned (rules without live public objects below), limit (1–1000, default 200), cursor. Responds {"policies": [ … ], "next_cursor": ""}, narrowed to the key's prefix.
/api/v1/dirs/{prefix}roReturns the EffectiveDir, even without a rule. The root is /api/v1/dirs/; a missing trailing slash is normalized without a redirect. Outside the key's prefix → 403. Rules carry ETag: "r<revision>".
/api/v1/dirs/{prefix}rw{ "index": "off", "hidden": false, "noindex": "inherit", "title": "", "description": "" }
Fully replaces the rule; omitted fields take defaults. 201 with Location when created, 200 when replaced. If-Match guards replacement; If-None-Match: * enforces creation (412 if a rule exists). Root changes require an unrestricted admin key, and the root cannot be hidden.
/api/v1/dirs/{prefix}rwJSON Merge Patch; creates a rule with defaults if none exists. null resets a field. 200.
curl -X PATCH https://store.example.com/api/v1/dirs/docs/raw/ \
-H "Authorization: Bearer $VELA_KEY" -d '{"index": "off"}'
/api/v1/dirs/{prefix}rwRemoves only the rule — never objects or descendant rules. 204, or 404 if there was no rule. Supports If-Match.