API reference
Store up to 4 KiB per key with a configurable TTL. Write and read raw data over HTTP without signing up.
PUT /api/kv/{key}
Percent-encode one UTF-8 key segment (1–4096 bytes). Send 0–4096 raw bytes in the body, or send text in ?value=. Combining value with a nonempty body is invalid.
TTL defaults to 31536000 s (1–157680000) and resets on every write. public accepts true or false; omitting it preserves visibility on updates.
Public listing only controls visibility in the directory. Anyone who knows the full key can read, overwrite or delete it. Version checks are optional.
Parameters
| Parameter | Accepted values | Default |
|---|---|---|
| ttl | 1–157680000 s | 31536000 s |
| public | true / false | false (create) |
| value | 0–4096 B | request body |
Compare version (If-Match)
Versions start at 1 and increase on each successful overwrite. Send the number in If-Match, or copy the quoted ETag from GET. If-Match fails with 412 when the current version differs or is missing. Prefer: return=previous returns HTTP 200, the original bytes and their Content-Type after updating an existing key. X-KV-Version identifies the new version.
Examples
curl -i --path-as-is -X PUT -H 'Content-Type: text/plain' --data-binary 'hello' 'https://api.kvember.com/api/kv/hello%2Fworld?ttl=31536000&public=true' curl -i --path-as-is -X PUT 'https://api.kvember.com/api/kv/hello%2Fworld?value=hello%20again'
curl -i --path-as-is -X PUT -H "If-Match: 2" -H 'Prefer: return=previous' --data-binary 'updated' 'https://api.kvember.com/api/kv/hello%2Fworld'
GET /api/kv/{key}
Read original bytes and Content-Type before expiry. Content-Type defaults to application/octet-stream. Unlisted keys can be read by anyone who knows the full key. A missing or expired key returns HTTP 200 with an empty body and no Content-Type. An existing empty value includes its stored Content-Type. X-KV-TTL gives the remaining lifetime in seconds.
Examples
curl -i --path-as-is 'https://api.kvember.com/api/kv/hello%2Fworld'
DELETE /api/kv/{key}
Deleting a missing or expired key returns 200 with an empty body.
Examples
curl -i --path-as-is -X DELETE 'https://api.kvember.com/api/kv/hello%2Fworld'
Queue · POST / GET /api/queue/{key}
POST appends raw bytes and returns 201 with the message ID. GET reads messages in FIFO order. Start with after=0 and pass next_after unchanged for the next page; has_more indicates another page. Response items contain the decimal string id, Unix time in milliseconds, value_base64 and content_type.
Set ttl in seconds for each new message (1–157680000, default 31536000). Existing messages keep their original expiry.
To list a new queue publicly, send its first message with
?public=true.
Examples
curl -i --path-as-is -X POST -H 'Content-Type: text/plain; charset=utf-8' --data-binary 'hello' 'https://api.kvember.com/api/queue/team%2Fchat?ttl=31536000'
curl -i --path-as-is 'https://api.kvember.com/api/queue/team%2Fchat?after=0&limit=50'
Status codes
- 200
- Successful read, or an empty response for a missing URL or expired key.
- 201
- Created
- 204
- No content
- 400
- Invalid key, parameter or header
- 401
- Admin authentication required
- 405
- Method unsupported
- 412
- The version differs or the key is missing.
- 413
- Body too large
- 421
- Use the configured data hostname
- 429
- Rate limited; see Retry-After
- 500
- Server error
- 507
- Capacity limit reached