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 retrieve

Example request:

GET /servers/{server_id}/autoprimaries HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK

    OK.

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "ip": "string",
        "nameserver": "string",
        "account": "string"
    }
    

  • default

    The input to the operation was not valid

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": "string",
        "errors": [
            "string"
        ]
    }
    

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 retrieve

Example request:

POST /servers/{server_id}/autoprimaries HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "ip": "string",
    "nameserver": "string",
    "account": "string"
}
Status Codes:
  • 201 Created – Created

  • default

    The input to the operation was not valid

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": "string",
        "errors": [
            "string"
        ]
    }
    

DELETE /servers/{server_id}/autoprimaries/{ip}/{nameserver}

Delete the autoprimary entry

Parameters:
  • server_id (string) – The id of the server to retrieve

  • ip (string) – IP address of autoprimary

  • nameserver (string) – DNS name of the autoprimary

Status Codes:
  • 204 No Content – OK, key was deleted

  • default

    The input to the operation was not valid

    Example response:

    HTTP/1.1 default -
    Content-Type: application/json
    
    {
        "error": "string",
        "errors": [
            "string"
        ]
    }
    

Objects

An autoprimary object represents a single autoprimary server.

json Autoprimary : object

Autoprimary server

An autoprimary server that can provision new domains.

Optional members:
account : string

Account name for the autoprimary server

ip : string

IP address of the autoprimary server

nameserver : string

DNS name of 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