Configuration endpoint

Configuration endpoint

GET /api/v1/servers/:server_id/config

Returns all ConfigSetting for a single server

Parameters:
  • server_id – The name of the server
POST /api/v1/servers/:server_id/config

Note

Not implemented

Creates a new config setting. This is useful for creating configuration for new backends.

Parameters:
  • server_id – The name of the server
GET /api/v1/servers/:server_id/config/:config_setting_name

Retrieve a single setting

Parameters:
  • server_id – The name of the server
  • config_setting_name – The name of the setting to retrieve
PUT /api/v1/servers/:server_id/config/:config_setting_name

Change a single setting

Note

Only allow-from can be set.

Parameters:
  • server_id – The name of the server
  • config_setting_name – The name of the setting to change

Example request

PUT /api/v1/servers/localhost/config/allow-from HTTP/1.1
Host: localhost:8082
User-Agent: curl/7.54.1
Accept: application/json
X-Api-Key: secret
Content-Type: application/json
Content-Length: 48

{ "name": "allow-from", "value": ["127.0.0.0/8"] }

Example response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 48
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'
Content-Type: application/json
Server: PowerDNS/0.0.g00799130f
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Permitted-Cross-Domain-Policies: none
X-Xss-Protection: 1; mode=block

{"name": "allow-from", "value": ["127.0.0.0/8"]}