Autoprimaries

This API is used to manage autoprimaries.

Autoprimary endpoints

GET /servers/{server_id}/autoprimaries

Get a list of autoprimaries

Parameters:
  • server_id (string) – The id of the server to manage the list of autoprimaries on
Status Codes:
POST /servers/{server_id}/autoprimaries

Add an autoprimary

This methods add a new autoprimary server.

Parameters:
  • server_id (string) – The id of the server to manage the list of autoprimaries on
Status Codes:
DELETE /servers/{server_id}/autoprimaries/{ip}/{nameserver}

Delete the autoprimary entry

Parameters:
  • server_id (string) – The id of the server to delete the autoprimary from
  • ip (string) – IP address of autoprimary
  • nameserver (string) – DNS name of the autoprimary
Status Codes:

Objects

An autoprimary object represents a single autoprimary server.

Autoprimary

An autoprimary server that can provision new domains.

Object Properties:
 
  • ip (string) – IP address of the autoprimary server
  • nameserver (string) – DNS name of the autoprimary server
  • account (string) – Account name for the autoprimary server

Examples

Listing autoprimaries

GET /servers/localhost/autoprimaries HTTP/1.1
X-Api-Key: secret
Content-Type: application/json

Will yield a response similar to this (several headers omitted):

HTTP/1.1 200 Ok
Content-Type: application/json

[{"ip":"192.0.2.1","nameserver":"ns.example.com","account":""},{"ip":"192.0.2.50","nameserver":"ns.example.org","account":"example"}]

Creating an autoprimary

POST /servers/localhost/autoprimaries HTTP/1.1
X-Api-Key: secret
Content-Type: application/json

{"ip":"192.0.2.1","nameserver":"ns.example.com","account":""}

Will yield a response similar to this (several headers omitted):

HTTP/1.1 201 Created

Deleting an autoprimary

DELETE /servers/localhost/autoprimaries/192.0.2.1/ns.example.com HTTP/1.1
X-Api-Key: secret
Content-Type: application/json

Will yield a response similar to this (several headers omitted):

HTTP/1.1 204 No Content