-
Notifications
You must be signed in to change notification settings - Fork 0
API Cheatsheet
kochetkov-ma edited this page Mar 31, 2026
·
1 revision
Base URL: https://brewpage.app (alias: https://brewdata.app)
POST /api/html → Publish page
GET /api/html/{ns}/{id} → Get page
PUT /api/html/{ns}/{id} → Update page
DELETE /api/html/{ns}/{id} → Delete page
GET /api/html/{ns} → List pages in namespace
POST body:
{
"namespace": "my-ns",
"content": "<h1>Hello</h1>",
"format": "HTML | MARKDOWN",
"password": "optional",
"ttlDays": 365,
"tags": ["tag1"]
}Headers: X-Owner-Token: tok_xxx (update/delete) · X-Password: secret (protected pages)
PUT /api/kv/{ns}/{id}/{key} → Set key
GET /api/kv/{ns}/{id}/{key} → Get key
GET /api/kv/{ns}/{id} → List keys
DELETE /api/kv/{ns}/{id}/{key} → Delete key
DELETE /api/kv/{ns}/{id} → Delete store
Limits: 1,000 keys/store, 1 MB/value
POST /api/json/{ns}/{collection} → Create doc
GET /api/json/{ns}/{collection}/{id} → Get doc
GET /api/json/{ns}/{collection} → List docs
DELETE /api/json/{ns}/{collection}/{id} → Delete doc
DELETE /api/json/{ns}/{collection} → Delete collection
Limits: 10,000 docs/collection, 1 MB/document
POST /api/files/uploads → Upload (multipart)
GET /api/files/{ns}/{id}/{filename} → Download
GET /api/files/{ns} → List files
DELETE /api/files/{ns}/{id} → Delete file
Limits: 5 MB/file, 1,000 files/namespace
GET /api/gallery/pages → Browse public pages
GET /api/gallery/files → Browse public files
GET /api/gallery/pages?search=query → Search
GET /api/stats → Platform statistics
Every resource gets: https://brewpage.app/s/{code}
| Operation | Limit |
|---|---|
| Uploads (POST) | 60/hour/IP |
| Reads (GET) | 300/min/IP |
| Resource | Max Size | Max Count |
|---|---|---|
| HTML page | 5 MB | — |
| KV value | 1 MB | 1,000 keys/store |
| JSON doc | 1 MB | 10,000 docs/collection |
| File | 5 MB | 1,000 files/ns |
| TTL | 30–365 days | — |