Base URL
/api/v1
Health
GET /health — returns OK
Create file metadata
POST /api/v1/files
application/json
{
"name": "example.txt",
"hash": "sha1-hash",
"size": 1024,
"content_type": "text/plain",
"private": false,
"comment": ""
}
Upload file data
POST /api/v1/meta/{hash}
application/octet-stream
Get file metadata
GET /api/v1/meta/{hash}
Download
GET /api/v1/files/{slug}
List files
GET /api/v1/files?limit=50&offset=0
Delete file
DELETE /api/v1/files/{slug}
Auth
GET /auth/login — Google OAuth
GET /auth/me — current user JSON
GET /auth/logout — logout
Example
# Create metadata
curl -X POST /api/v1/files -H "Content-Type: application/json" \\
-d '{"name":"f.txt","hash":"...","size":1024,"content_type":"text/plain"}'
# Upload body
curl -X POST /api/v1/meta/YOUR_HASH -H "Content-Type: application/octet-stream" --data-binary @f.txt
# Download
curl /api/v1/files/SLUG -o out.txt