Base URL (local default): http://127.0.0.1:5000/api/v1
- Swagger UI:
/api/v1/docs - OpenAPI JSON:
/api/v1/openapi.json
Write operations require Bearer token auth when API_TOKEN is configured.
-H 'Authorization: Bearer change-me'Service health check.
curl http://127.0.0.1:5000/api/v1/healthCreate or update a favicon record.
curl -X POST http://127.0.0.1:5000/api/v1/favicons \
-H 'Authorization: Bearer change-me' \
-H 'Content-Type: application/json' \
-d '{
"host": "example.org",
"url": "https://example.org/favicon.ico",
"hashes": {
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"sha1": "dummy",
"md5": "dummy",
"mmh3": "-123456789"
},
"metadata": {
"content_type": "image/x-icon",
"size": 1150,
"http_status": 200
},
"tags": ["seed"]
}'Convenience mode: include favicon_base64 to let the server compute hashes. Bytes are discarded and never persisted.
Fetch a canonical record by SHA-256 key.
curl http://127.0.0.1:5000/api/v1/favicons/<sha256>Search records by one selector, with pagination support (limit and offset):
?algo=<algo>&value=<hash>(orhash=alias)?host=<hostname>?tag=<tag>
curl 'http://127.0.0.1:5000/api/v1/search?algo=mmh3&value=-123456789'
curl 'http://127.0.0.1:5000/api/v1/search?algo=murmur3&value=-123456789'
curl 'http://127.0.0.1:5000/api/v1/search?host=example.org'
curl 'http://127.0.0.1:5000/api/v1/search?tag=seed'
curl 'http://127.0.0.1:5000/api/v1/search?tag=seed&limit=25&offset=50'Pagination fields in search responses:
count: number of items in this pagetotal: total number of matching recordslimit: requested page sizeoffset: requested offsethas_more:trueif more records remain after this page
Validation rules:
limitmust be between1and500offsetmust be0or greater
Returns backend aggregate counters and index cardinality summaries.
curl http://127.0.0.1:5000/api/v1/statsErrors are returned as JSON:
{
"error": "validation_error",
"message": "..."
}