Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GET dns_servers

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a list of all DNS Servers configuration data.

Resource URL

http://{host}/api/2.0/dns_servers/.format

Example Request

GET 

  1. http://44.235.52.211/api/2.0/dns_servers/.json

Expand
titleRESPONSE
Code Block
languagejson
[
    {
        "DnsServer": {
            "id": 2,
            "title": "new_kel1YIgqR8",
            "ip_address": "8.8.8.8",
            "modified": "1611142282208",
            "created": "1611142282208"
        }
    },
    {
        "DnsServer": {
            "id": 3,
            "title": "Google",
            "ip_address": "8.8.4.4",
            "modified": "1619431370177",
            "created": "1619431370177"
        }
    }
]

 


 

GET dns_servers/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a single specific DNS Server configuration data.

Resource URL

http://{host}/api/2.0/dns_servers/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired DNS Server configuration to be viewed.

Example Request

GET 

  1. http://44.235.52.211/api/2.0/dns_servers/2/.json

Expand
titleRESPONSE
Code Block
languagejson
{
    "DnsServer": {
        "id": 2,
        "title": "new_kel1YIgqR8",
        "ip_address": "8.8.8.8",
        "modified": "1617036009750",
        "created": "1617036009750"
    }
}

 


 

POST dns_servers

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

POST

Adds a new DNS Server configuration.

Resource URL

http://{host}/api/2.0/dns_servers/.format

Example Request

POST 

  1. http://44.235.52.211/api/2.0/dns_servers/.json

Expand
Body
titleBODY
Code Block
languagejson
{
  "DnsServer": {
    "ip_address": "1.1.1.1",
    "title": "NEW_DNS"
  }
}
Response
Expand
titleRESPONSE
Code Block
languagejson
{
    "DnsServer": {
        "id": 4,
        "title": "NEW_DNS",
        "ip_address": "1.1.1.1",
        "modified": "1619431681664",
        "created": "1619431681664"
    }
}

 


 

PUT dns_servers/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

PUT

Updates a single specific DNS Server configuration.

Resource URL

http://{host}/api/2.0/dns_servers/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired DNS Server configuration to be updated.

Example Request

PUT 

  1. http://44.235.52.211/api/2.0/dns_servers/3/.json

Body
Expand
titleBODY
Code Block
languagejson
{
  "DnsServer": {
    "ip_address": "2.2.2.2",
    "title": "EDIT_DNS"
  }
}
Expand
title
Response
RESPONSE
Code Block
languagejson
{
    "DnsServer": {
        "id": 3,
        "title": "EDIT_DNS",
        "ip_address": "2.2.2.2",
        "modified": "1619431784698",
        "created": "1619431370177"
    }
}

 


 

DELETE dns_servers/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

DELETE

Deletes a single specific DNS Server configuration.

Resource URL

http://{host}/api/2.0/dns_servers/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired DNS Server configuration to be deleted.

Example Request

DELETE 

  1. http://44.235.52.211/api/2.0/dns_servers/3/.json

Expand
titleRESPONSE
Code Block
languagejson
{
    "success": true
}