# README
HTTP API
You can manage all blocks with basic HTTP API functions.
Authentication
API bearer token can be set on sdns config. If the token set, Authorization header should be send on API requests.
Example Header
Authorization: Bearer my_very_long_token
Actions
GET /api/v1/block/set/:key
It is used to create a new block.
request
response
{"success":true}
GET /api/v1/block/get/:key
Used to request an existing block
request
response
{"success":true}
or
{"error":"domain.com not found"}
GET /api/v1/block/exists/:key
It queries whether it has a block.
request
response
{"success":true}
GET /api/v1/block/remove/:key
Deletes the block.
request
response
{"success":true}
GET /api/v1/purge/domain/type
Purge a cached query.
request
response
{"success":true}
GET /metrics
Export the prometheus metrics.