Welcome to PocketJSON, a lightweight, single-binary JSON storage service with built-in expiry and multi-tenant support. Perfect for developers who need a quick, reliable way to store and retrieve JSON data without the overhead of a full database setup.
POST your JSON data to create a new storage entry:
curl -X POST http://localhost:9819 \
-H "Content-Type: application/json" \
-d '{"name":"John","age":30}'
Response:
{"id":"f7a8b9c0d1e2","expires_at":"2024-01-21T15:30:45Z"}
GET your stored JSON using the ID:
curl http://localhost:9819/f7a8b9c0d1e2
Response:
{"name":"John","age":30}
Use an API key to set custom IDs and expiration:
curl -X POST "http://localhost:9819/my-custom-id?expiry=72" \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{"status":"active"}'
Note: Authenticated users get prefixed IDs and longer expiration options.