These endpoints allow configuration of per-zone Views.
GET /servers/{server_id}/views¶List all views in a server
| Parameters: |
|
|---|---|
| Status Codes: |
|
GET /servers/{server_id}/views/{view}¶List the contents of a given view
| Parameters: |
|
|---|---|
| Status Codes: |
|
POST /servers/{server_id}/views/{view}¶Adds a zone to a given view, creating it if needed
| Parameters: |
|
|---|---|
| Status Codes: |
|
DELETE /servers/{server_id}/views/{view}/{id}¶Removes the given zone from the given view
| Parameters: |
|
|---|---|
| Status Codes: |
|
GET /api/v1/servers/localhost/views 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
{"views":["trusted","untrusted"]}
GET /api/v1/servers/localhost/views/trusted 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
{"zones":["example.com..trusted","otherdomain.com..untrusted"]}
POST /api/v1/servers/localhost/views/trusted HTTP/1.1
X-API-Key: secret
Content-Type: application/json
{"name":"example.org..trusted"}
Will yield a response similar to this (several headers omitted):
HTTP/1.1 204 No Content
DELETE /api/v1/servers/localhost/views/trusted/example.com. HTTP/1.1
X-API-Key: secret
Will yield a response similar to this (several headers omitted):
HTTP/1.1 204 No Content