The server endpoint is the ‘basis’ for all other API operations.
In the PowerDNS Authoritative Server, the server_id is always localhost.
However, the API is written in a way that a proxy could be in front of many servers, each with their own server_id.
GET /servers¶List all servers
| Status Codes: |
|
|---|
GET /servers/{server_id}¶List a server
| Parameters: |
|
|---|---|
| Status Codes: |
|
Server¶| Object Properties: | |
|---|---|
|
|
GET /api/v1/servers HTTP/1.1
X-API-Key: secret
Will yield a response similar to this (several headers omitted):
HTTP/1.1 200 OK
Content-Type: application/json
[{"autoprimaries_url": "/api/v1/servers/localhost/autoprimaries{/autoprimary}", "config_url": "/api/v1/servers/localhost/config{/config_setting}", "daemon_type": "authoritative", "id": "localhost", "type": "Server", "url": "/api/v1/servers/localhost", "version": "4.6.1", "zones_url": "/api/v1/servers/localhost/zones{/zone}"}]
GET /api/v1/servers/localhost HTTP/1.1
X-API-Key: secret
Will yield a response similar to this (several headers omitted):
HTTP/1.1 200 OK
Content-Type: application/json
{"autoprimaries_url": "/api/v1/servers/localhost/autoprimaries{/autoprimary}", "config_url": "/api/v1/servers/localhost/config{/config_setting}", "daemon_type": "authoritative", "id": "localhost", "type": "Server", "url": "/api/v1/servers/localhost", "version": "4.6.1", "zones_url": "/api/v1/servers/localhost/zones{/zone}"}