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.

MethodPathScopePurpose
GET/healthznoneHealth probe
GET/inforoServer, key and limits
GET/objectsroList a directory
POST/objectsrwCreate from inline content
GET/objects/{path}roObject metadata
PATCH/objects/{path}rwChange metadata
DELETE/objects/{path}rw / adminDelete to trash or purge
PUT/content/{path}rwStreaming upload
GET/content/{path}roDownload
POST/moverwRename or move
GET/trashrwList the trash
DELETE/trashadminPurge many entries
DELETE/trash/{id}adminPurge one entry
POST/trash/{id}/restorerwRestore an entry
POST/linksrwCreate a signed link
GET/linksrwList signed links
DELETE/links/{id}rwRevoke a link
GET/dirsroList directory policies
GET/dirs/{prefix}roEffective policy
PUT/dirs/{prefix}rwReplace a policy
PATCH/dirs/{prefix}rwPatch a policy
DELETE/dirs/{prefix}rwRemove a policy

Health and info

GET/healthzno auth

Outside /api/v1. Returns 200 {"status":"ok"} when the database responds and the storage backend is usable, otherwise 503.

GET/api/v1/inforo

Server 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_visibility is the stricter of the symlink's and the target's visibility, and private for a broken symlink.
  • target.state is ok, trashed (the target is in the trash; path is its original path) or gone (purged, or outside the key's prefix; path is null). target.visibility is null unless the target is alive.
  • A broken symlink reports size: 0, sha256: "" and content_type: "".
GET/api/v1/objectsro
prefixquery, string

Directory to list, ending in /; empty for the root.

recursivequery, booldefault false

Non-recursive returns immediate children: objects plus dirs (common prefixes). Recursive returns all objects below and an empty dirs.

visibilityquery, comma-separated

Filter by effective visibility, e.g. public,unlisted.

tagquery, repeatable

Tag 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 | symlink

Only files or only symlinks.

brokenquery, bool

Only broken symlinks; implies kind=symlink.

targetquery, path

Only 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 200

Page size.

cursorquery, opaque

From 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.

POST/api/v1/objectsrw

Create 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.

GET/api/v1/objects/{path}ro

Returns the Object with ETag: "r<revision>".

PATCH/api/v1/objects/{path}rw

JSON 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"}'
DELETE/api/v1/objects/{path}rw
recursivequery, bool

Required to delete a directory (path ending in /). Deleting the whole root recursively is rejected.

purgequery, bool

Delete permanently instead of moving to the trash. Requires admin.

If-Matchheader

Supported 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

PUT/api/v1/content/{path}rw

Streaming upload. The body is the raw file — not multipart. Metadata travels in headers:

HeaderValue
Content-TypeMIME type; absent or application/octet-stream means “detect”
Content-LengthRecommended, so the limit is checked before reading. Chunked bodies are checked while streaming.
X-Vela-Visibilitypublic, unlisted or private
X-Vela-Title, X-Vela-DescriptionPercent-encoded UTF-8
X-Vela-TagsComma-separated
X-Vela-Dispositioninline or attachment
X-Vela-Expires-AtRFC 3339 time, or none to clear
X-Vela-SHA256Hex 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, 201 with Location.
  • Object exists and no If-None-Match → content is overwritten, 200. The ID, signed links and metadata not given in headers are kept; revision increases; the content type is re-detected unless sent.
  • The proxy must stream the body (proxy_request_buffering off in 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
GET/api/v1/content/{path}ro

Downloads 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

POST/api/v1/moverw
{ "from": "docs/math/", "to": "archive/math/", "overwrite": false, "recursive": true }
  • Single object: from and to are object paths. If to exists: 409 without overwrite; with it, the existing object goes to the trash first.
  • Recursive: recursive: true with prefixes ending in /. Everything moves in one transaction. Any conflict without overwrite → 409 with details.conflicts (up to 100 paths) and nothing changes.
  • Directory policies under the source prefix move too; conflicting target policies → 409 conflict with details.conflicting_policies. With overwrite, 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.

Create 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 source and path are required. A symlink as source is followed: the new symlink points at the same file. A broken one is 404; a directory without recursive is 400.
  • copy_meta defaults to true for new symlinks — title, description, tags, disposition and visibility are copied from the source — and to false when retargeting. Explicit fields override both; expires_at is never copied.
  • An occupied path is 409 already_exists without overwrite. With it, a symlink is retargeted in place (same ID, revision + 1) and answers 200; a file goes to the trash and a new symlink answers 201.
  • The key's prefix must cover both path and the source, otherwise 403.
  • Recursive: recursive: true with prefixes ending in /. Every file below source is linked in one transaction; any conflict → 409 with details.conflicts (up to 100 paths) and nothing is created. At most 10 000 objects; path cannot lie inside source. Responds 200 with {"created": 4, "replaced": 0, "skipped": []}, where skipped lists 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

GET/api/v1/trashrw

Query: 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": ""
}
POST/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.

DELETE/api/v1/trash/{id}admin

Permanently deletes one entry and its link records. 204. Symlinks to a purged file stay broken for good.

DELETE/api/v1/trashadmin

Query 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.

{
  "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.

{ "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.

Query: path, include_expired (bool), include_revoked (bool). Responds {"links": [ … ]}, newest first, with working URLs — hence the rw requirement.

Revokes 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.

GET/api/v1/dirsro

Query: 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.

GET/api/v1/dirs/{prefix}ro

Returns 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>".

PUT/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.

PATCH/api/v1/dirs/{prefix}rw

JSON 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"}'
DELETE/api/v1/dirs/{prefix}rw

Removes only the rule — never objects or descendant rules. 204, or 404 if there was no rule. Supports If-Match.