-
Notifications
You must be signed in to change notification settings - Fork 7
REST API
The whole point of this is to have an HTTP API for the PowerDNS database, so we'll strive for having it "REST-like". This will also play well with backbone.js if we ever make a HTML/JS UI for it.
PUT /api/example.com?some=setting
Will fail if example.com already exists.
POST /api/example.com?some=parameter
Will fail if example.com doesn't exist.
GET /api/example.com
This will include the actual records (including a numeric ID from the database), use options to filter, for example:
Only get the SOA record: GET /api/example.com?type=SOA
Only get A records: GET /api/example.com?type=A
Only get records with a name starting with foo: GET /api/example.com?name=foo%
PUT /api/example.com/?name=www&type=A&data=10.0.0.1&ttl=86400
Will always create a new record, even if there already is a 'www.example.com' A record.
POST /api/example.com/123?data=10.0.0.2
DELETE /api/example.com/123