Docs / Delivery

Storage & images

Per-tenant S3-style buckets: upload with short-lived presigned PUTs, list and delete files, front a zone with a CDN pull zone, and transform images on the fly through a signed optimizer.

presigned uploadCDN-frontableimage optimizer

Storage zones

POST /v1/storage-zones storage:write

Create a storage zone (a project-scoped, S3-style bucket).

curl
curl -X POST https://api.ollanode.com/v1/storage-zones \
  -H "Authorization: Bearer $OLLANODE_API_KEY" \
  -H "Content-Type: application/json" -d '{"name":"site-assets"}'
Response
{ "id":"stz_...", "name":"site-assets", "project_id":"proj_...", "created_at":"..." }
GET /v1/storage-zones storage:read

List storage zones (paginated).

GET /v1/storage-zones/{id} storage:read

Get a zone with computed bytes_used and file_count.

DELETE /v1/storage-zones/{id} storage:delete

Delete the zone and all its objects. Agent keys are approval-gated.

Presigned upload

POST /v1/storage-zones/{id}/upload-url storage:write

Mint a short-lived presigned PUT URL for a path in the zone, then upload bytes directly to it. Enforces the project storage quota (409 if over); paths are sanitized.

curl
curl -X POST https://api.ollanode.com/v1/storage-zones/stz_abc/upload-url \
  -H "Authorization: Bearer $OLLANODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"images/hero.jpg","content_type":"image/jpeg"}'
# -> { "url":"https://...presigned PUT...", "path":"images/hero.jpg" }

curl -X PUT --upload-file hero.jpg -H "Content-Type: image/jpeg" "<url>"

Files

GET /v1/storage-zones/{id}/files storage:read

List files (cursor-paginated: ?limit= 1–1000 default 100, ?cursor=). Each item carries a short-lived presigned GET url.

curl
curl "https://api.ollanode.com/v1/storage-zones/stz_abc/files?limit=100" \
  -H "Authorization: Bearer $OLLANODE_API_KEY"
Response
{ "items":[{"path":"images/hero.jpg","size_bytes":30512,"url":"https://...presigned-GET..."}],
  "next_cursor": null }
DELETE /v1/storage-zones/{id}/files?path=… storage:delete

Delete a file by path. Agent keys are approval-gated, bound to the exact path.

curl
curl -X DELETE "https://api.ollanode.com/v1/storage-zones/stz_abc/files?path=images/hero.jpg" \
  -H "Authorization: Bearer $OLLANODE_API_KEY"

CDN-fronted access

There's no separate endpoint — create a pull zone with storage_zone_id instead of origin_url, and the edge serves the zone's files with caching, X-Cache-Status, optional hotlink signing, CORS, and edge rules.

Image optimizer

⚙️ Config-gated: requires IMGPROXY_KEY + IMGPROXY_SALT. Verified live: a 30 KB JPEG → 2.9 KB WebP at 200px.

GET /v1/storage-zones/{id}/image-url storage:read

Return a signed imgproxy URL that resizes/reformats/recompresses a stored image on the fly. Params: path (required), w, h, resize (fit|fill|force), q (1–100), format (webp|avif|jpg).

curl
curl "https://api.ollanode.com/v1/storage-zones/stz_abc/image-url?path=images/hero.jpg&w=200&format=webp&q=80" \
  -H "Authorization: Bearer $OLLANODE_API_KEY"
# -> { "url":"https://api.ollanode.com/<sig>/rs:fit:200:0:0/q:80/f:webp/<enc-source>" }
Use cases
  • Generate a responsive srcset from a single stored master.
  • Serve AVIF/WebP to modern browsers, JPEG to the rest.