NAV Navbar
Logo
shell

Introduction

Welcome to the DNSVault API! You can use our API to access DNSVault API endpoints, which can get information on nodes, views, zones, records and others that is related to our DNSVault Appliance.

We have language bindings in Shell! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "Authorization: iwwTXK54aahsosrx5JK7hkTe"

Make sure to replace iwwTXK54aahsosrx5JK7hkTe with your API key.

DNSVault uses API keys to allow access to the API. You can register a new DNSVault API key at our developer portal.

DNSVault expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: iwwTXK54aahsosrx5JK7hkTe

Nodes

Get All Nodes

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes'

The above command returns JSON structured like this:

[
    {
        {
            "id": 5,
            "node_name": "elastic2.dnsvault.net",
            "description": null,
            "created_at": "2016-06-22T16:10:10.602Z",
            "updated_at": "2016-06-22T16:10:10.602Z",
            "tag": "agent",
            "fingerprint": "64:9E:06:F0:0C:AB:0F:63:2B:0D:DC:C6:E2:DF:BE:33:8F:69:3C:A0:99:D8:1F:65:76:AE:EA:DA:C6:64:12:3F",
            "fingerprint_algorithm": "SHA256"
        }
    }
]

This endpoint retrieves all nodes.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes

Get a Node

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2'

The above command returns JSON structured like this:

{
  "id": 2,
  "node_name": "elastic2.dnsvault.net",
  "description": null,
  "created_at": "2016-06-22T16:10:10.602Z",
  "updated_at": "2016-06-22T16:10:10.602Z",
  "tag": "agent",
  "fingerprint": "64:9E:06:F0:0C:AB:0F:63:2B:0D:DC:C6:E2:DF:BE:33:8F:69:3C:A0:99:D8:1F:65:76:AE:EA:DA:C6:64:12:3F",
  "fingerprint_algorithm": "SHA256"
}

This endpoint retrieves a node.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:id

URL Parameters

Parameter Description
ID The ID of the node to retrieve

Delete a Node

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
     --request DELETE \
  'http://www.dnsvault.net/api/v1/nodes/2'

The above command returns JSON structured like this:

{
  "success": {
    "7005": "Node has been deleted"
  }
}

This endpoint delete a node.

HTTP Request

DELETE http://www.dnsvault.net/api/v1/nodes/:id

URL Parameters

Parameter Description
ID The ID of the node to delete

List all Certs

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/certificates'

The above command returns JSON structured like this:

[
  {
    "status": "+",
    "node": "elastic3.dnsvault.net",
    "algorithm": "(SHA256)",
    "hash": "BB:52:BC:9B:EF:3F:19:40:D0:C4:21:7E:F2:F7:5F:9B:80:06:33:5D:86:CB:DB:3C:D7:7D:50:38:ED:E1:51:4B"
  },
  {
    "status": "+",
    "node": "test01.me.my",
    "algorithm": "(SHA256)",
    "hash": "EA:0D:3B:D8:B3:15:D1:91:5E:D5:4E:C3:FE:6A:C6:D8:41:C4:E9:11:60:33:4D:DE:40:AF:2D:72:05:D0:A8:0D"
  }
]

This endpoint get list of certificates.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/certificates

List all Nodes Requests

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/node_request'

The above command returns JSON structured like this:

[
  {
    "status": "?",
    "name": "elastic2.dnsvault.net",
    "algorithm": "(SHA256)",
    "fingerprint": "B8:FD:D2:8F:33:B1:FF:AC:5F:60:0A:DA:70:66:09:87:EA:B7:4C:14:8D:0F:4F:B0:67:60:69:83:9E:48:78:15"
  }
]

This endpoint get list of node request.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/node_request

Accept Node Request

curl --include \
     --request PUT \
     --header "Content-Type: application/json" \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
     --data-binary "{
    \"node_name\": \"elastic2.dnsvault.net\"
}" \
  'http://www.dnsvault.net/api/v1/nodes/accept'

The above command returns JSON structured like this:

[
  {
    "status": "?",
    "name": "elastic2.dnsvault.net",
    "algorithm": "(SHA256)",
    "fingerprint": "B8:FD:D2:8F:33:B1:FF:AC:5F:60:0A:DA:70:66:09:87:EA:B7:4C:14:8D:0F:4F:B0:67:60:69:83:9E:48:78:15"
  }
]

This endpoint get list of node request.

HTTP Request

PUT http://www.dnsvault.net/api/v1/nodes/accept

Reject Node Request

curl --include \
     --request PUT \
     --header "Content-Type: application/json" \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
     --data-binary "{
    \"node_name\": \"elastic2.dnsvault.net\"
}" \
  'http://www.dnsvault.net/api/v1/nodes/reject'

The above command returns JSON structured like this:

[
  {
    "status": "?",
    "name": "elastic2.dnsvault.net",
    "algorithm": "(SHA256)",
    "fingerprint": "B8:FD:D2:8F:33:B1:FF:AC:5F:60:0A:DA:70:66:09:87:EA:B7:4C:14:8D:0F:4F:B0:67:60:69:83:9E:48:78:15"
  }
]

This endpoint get list of node request.

HTTP Request

PUT http://www.dnsvault.net/api/v1/nodes/reject

Options

Get All Options

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/1/options'

The above command returns JSON structured like this:

[
    {
        "id": 3,
        "statement": "listen-on-ipv4",
        "statement_value": "address",
        "status": "active",
        "category": null,
        "description": null,
        "created_at": "2017-08-17T05:09:45.697Z",
        "updated_at": "2017-08-18T04:01:35.311Z"
    },
    {
        "id": 4,
        "statement": "listen-on-ipv6",
        "statement_value": "address",
        "status": "active",
        "category": null,
        "description": null,
        "created_at": "2017-08-17T05:09:45.751Z",
        "updated_at": "2017-08-18T04:01:45.518Z"
    }
]

This endpoint retrieves all options.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/1/options

Get an Option

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/1/options/3'

The above command returns JSON structured like this:

{
    "id": 3,
    "statement": "listen-on-ipv4",
    "statement_value": "address",
    "status": "active",
    "category": null,
    "description": null,
    "created_at": "2017-08-17T05:09:45.697Z",
    "updated_at": "2017-08-18T04:01:35.311Z"
}

This endpoint retrieve details of an option.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/1/options/:id

URL Parameters

Parameter Description
Id The ID of the option to retrieve

Create Option

You may create an option using this action. It takes a JSON object containing a parameters.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"acl_name\": \"blacklist6\",
    \"description\": \"This is for internal network\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/options'

The above command returns JSON structured like this:

{
    "id": 3,
    "statement": "listen-on-ipv4",
    "statement_value": "address",
    "status": "active",
    "category": null,
    "description": null,
    "created_at": "2017-08-17T05:09:45.697Z",
    "updated_at": "2017-08-18T04:01:35.311Z"
}

This endpoint creates an option.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/options

Required Arguments

Parameter Description
statement Name of a statement, such as ‘listen-on-ipv4’
statement_value Value of a statement, such as ‘address’

Update Option

curl --include \
     --request PUT \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"option\": {
        \"description\": \"This is for internal network\"
    }
}" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/options/18'

The above command returns JSON structured like this:

{
    "id": 3,
    "statement": "listen-on-ipv4",
    "statement_value": "address",
    "status": "active",
    "category": null,
    "description": null,
    "created_at": "2017-08-17T05:09:45.697Z",
    "updated_at": "2017-08-18T04:01:35.311Z"
}

This endpoint update a options.

HTTP Request

PUT http://www.dnsvault.net/api/v1/nodes/:node_id/dns/options/:id

Required Arguments

Parameter Description
statement Name of a statement, such as ‘listen-on-ipv4’
statement_value Value of a statement, such as ‘address’

Delete Option

curl --include \
     --request DELETE \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/options/2'

The above command returns JSON structured like this:

{
    "id": 3,
    "statement": "listen-on-ipv4",
    "statement_value": "address",
    "status": "active",
    "category": null,
    "description": null,
    "created_at": "2017-08-17T05:09:45.697Z",
    "updated_at": "2017-08-18T04:01:35.311Z"
}

This endpoint delete a option.

HTTP Request

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/options/:id

URL Parameters

Parameter Description
Id The ID of the option to delete

Views

Get All Views

You may list collection of view using this action. Default per page is 20 views, you can specify page and per_page parameters. e.g. http://srv1.dnsvault.net:3000/api/v1/views?page=1&per_page=20

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views'

The above command returns JSON structured like this:

[
    {
        "id": 50,
        "node_id": 2,
        "view_name": "cloudlocal",
        "description": "",
        "status": "active",
        "position": 0,
        "created_at": "2017-03-31T09:17:41.743Z",
        "updated_at": "2017-03-31T09:17:41.766Z"
    },
    {
        "id": 51,
        "node_id": 2,
        "view_name": "cloudint",
        "description": "",
        "status": "active",
        "position": 1,
        "created_at": "2017-03-31T09:17:55.173Z",
        "updated_at": "2017-03-31T09:17:55.192Z"
    },
    {
        "id": 56,
        "node_id": 2,
        "view_name": "huala",
        "description": "",
        "status": "active",
        "position": 2,
        "created_at": "2017-06-20T04:27:19.146Z",
        "updated_at": "2017-06-20T04:27:19.205Z"
    }
]

This endpoint get list of views.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views

Get a View

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/2'

The above command returns JSON structured like this:

{
  "id": 2,
  "view_name": "roxme",
  "description": "This is for internal network",
  "status": true,
  "position": 1,
  "created_at": "2016-06-25T04:42:39.111Z",
  "updated_at": "2016-06-25T04:42:39.146Z",
  "node_id": 7,
  "node": {
    "id": 7,
    "node_name": "elastic2.dnsvault.net",
    "description": null,
    "created_at": "2016-06-23T03:44:19.064Z",
    "updated_at": "2016-06-23T03:44:19.064Z",
    "tag": "agent",
    "fingerprint": "83:81:16:F1:6C:B3:F3:F2:40:F1:0E:6E:34:22:55:C5:F9:73:D4:DA:B2:78:4D:2F:12:11:B9:3A:8C:D2:D4:3B",
    "fingerprint_algorithm": "SHA256"
  }
}

This endpoint get details of a view.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:id

URL Parameters

Parameter Description
Id The ID of the views to retrieve

Create View

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"view\": {
        \"view_name\": \"internal\",
        \"description\": \"This is for internal network\"
    }
}" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views'

The above command returns JSON structured like this:

{
  "id": 18,
  "view_name": "internal",
  "description": "This is for internal network",
  "status": true,
  "position": 2,
  "created_at": "2016-06-25T05:18:20.646Z",
  "updated_at": "2016-06-25T05:18:20.646Z",
  "node_id": 7,
  "node": {
    "id": 7,
    "node_name": "elastic2.dnsvault.net",
    "description": null,
    "created_at": "2016-06-23T03:44:19.064Z",
    "updated_at": "2016-06-23T03:44:19.064Z",
    "tag": "agent",
    "fingerprint": "83:81:16:F1:6C:B3:F3:F2:40:F1:0E:6E:34:22:55:C5:F9:73:D4:DA:B2:78:4D:2F:12:11:B9:3A:8C:D2:D4:3B",
    "fingerprint_algorithm": "SHA256"
  }
}

This endpoint create a views.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views

URL Parameters

Parameter Description
view_name View Name
description Description Of View

Update View

curl --include \
     --request PUT \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"view\": {
        \"description\": \"This is for internal network\"
    }
}" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/18'

The above command returns JSON structured like this:


{
  "id": 18,
  "view_name": "internal",
  "description": "YOLO",
  "status": true,
  "position": 2,
  "created_at": "2016-06-25T05:18:20.646Z",
  "updated_at": "2016-06-25T05:18:20.646Z",
  "node_id": 7,
  "node": {
    "id": 7,
    "node_name": "elastic2.dnsvault.net",
    "description": null,
    "created_at": "2016-06-23T03:44:19.064Z",
    "updated_at": "2016-06-23T03:44:19.064Z",
    "tag": "agent",
    "fingerprint": "83:81:16:F1:6C:B3:F3:F2:40:F1:0E:6E:34:22:55:C5:F9:73:D4:DA:B2:78:4D:2F:12:11:B9:3A:8C:D2:D4:3B",
    "fingerprint_algorithm": "SHA256"
  }
}

This endpoint update a views.

HTTP Request

PUT http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:id

URL Parameters

Parameter Description
description Description of a View

Delete View

curl --include \
     --request DELETE \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/18'

The above command returns JSON structured like this:

{
  "id": 18,
  "view_name": "internal",
  "description": "This is for internal network",
  "status": true,
  "position": 2,
  "created_at": "2016-06-25T05:18:20.646Z",
  "updated_at": "2016-06-25T05:18:20.646Z",
  "node_id": 7,
  "node": {
    "id": 7,
    "node_name": "elastic2.dnsvault.net",
    "description": null,
    "created_at": "2016-06-23T03:44:19.064Z",
    "updated_at": "2016-06-23T03:44:19.064Z",
    "tag": "agent",
    "fingerprint": "83:81:16:F1:6C:B3:F3:F2:40:F1:0E:6E:34:22:55:C5:F9:73:D4:DA:B2:78:4D:2F:12:11:B9:3A:8C:D2:D4:3B",
    "fingerprint_algorithm": "SHA256"
  }
}

This endpoint delete a view.

HTTP Request

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:id

URL Parameters

Parameter Description
Id The ID of the option to retrieve

View Statement

List all Statement

You may list collection of View Statement using this action.

curl --include \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/statements'

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "statement": "match-clients",
        "negate": false,
        "position": 0,
        "value_type": "ip_address",
        "value": "1.1.1.1",
        "status": "active",
        "port": 53,
        "read_only": false,
        "created_at": "2017-07-11T03:50:18.530Z",
        "updated_at": "2017-07-11T03:50:18.530Z"
    }
]

This endpoint retrieves all statements.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/statements

Show Statement

You may view detail of a statement using this action.

curl --include \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/statements/1'

The above command returns JSON structured like this:

{
    "id": 1,
    "statement": "match-clients",
    "negate": false,
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "status": "active",
    "port": 53,
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}

This endpoint retrieves detail of a statement.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/statements/:id

Create Statement

You may create a statement using this action. It takes a JSON object containing a parameters.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"type\": \"ip_address\",
    \"value\": \"1.1.1.1\",
    \"negate\": \"false\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/statements'

The above command returns JSON structured like this:

{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}

This endpoint creates a statement.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/statements

Delete a Statement

You may delete an statement using this action.

curl --include \
     --request DELETE \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/statements/1'

The above command returns JSON structured like this:

{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}

This endpoint creates a statement.

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/statements/:id

Delete multiple statements

You may delete multiple statements using this action.

curl --include \
     --request DELETE \
     --data-binary "{
    \"statements\": \"[6,7]\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/statements/1'

The above command returns JSON structured like this:

[{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}]

This endpoint delete multiple statement.

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/statements

Sort Statement

You may sort statements using this action.

curl --include \
     --request PUT \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"statement\": [
        {
             \"statement_id\": 3
        },
        {
             \"position\": 0 
        }
    ]
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/statements/sort'

The above command returns JSON structured like this:

[{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}]

This endpoint sort a statement.

PUT http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/statements/sorts

Sort multiple statement

You may sort statements using this action.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"statement\": [
        {
             \"statement_id\": 3
        },
        {
             \"position\": 0 
        }
    ]
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/statements/sort'

The above command returns JSON structured like this:

[{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}]

This endpoint sort multiple statement.

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/statements/sorts

Zones

List all Zones

You may list collection of zones using this action.

curl --include \
     --header "Content-Type: application/json" \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/50/zones'

The above command returns JSON structured like this:

[
    {
        "id": 52,
        "zone_name": "satu.com",
        "view_id": 50,
        "description": "",
        "zone_type": "master",
        "status": "active",
        "processing_status": true,
        "backend_status": false,
        "delete_status": false,
        "position": 1,
        "serial_number": null,
        "created_at": "2017-03-31T09:21:19.406Z",
        "updated_at": "2017-06-16T03:18:11.521Z"
    },
    {
        "id": 80,
        "zone_name": "yola.com",
        "view_id": 50,
        "description": "",
        "zone_type": "master",
        "status": "active",
        "processing_status": true,
        "backend_status": false,
        "delete_status": false,
        "position": 2,
        "serial_number": null,
        "created_at": "2017-07-03T03:03:25.766Z",
        "updated_at": "2017-07-03T03:03:25.857Z"
    },
    {
        "id": 81,
        "zone_name": "yoooow.com",
        "view_id": 50,
        "description": "",
        "zone_type": "master",
        "status": "active",
        "processing_status": true,
        "backend_status": false,
        "delete_status": false,
        "position": 3,
        "serial_number": null,
        "created_at": "2017-07-03T03:04:49.595Z",
        "updated_at": "2017-07-03T03:04:49.688Z"
    },
    {
        "id": 82,
        "zone_name": "meee.my",
        "view_id": 50,
        "description": "",
        "zone_type": "master",
        "status": "active",
        "processing_status": false,
        "backend_status": false,
        "delete_status": false,
        "position": 4,
        "serial_number": null,
        "created_at": "2017-07-03T03:06:42.428Z",
        "updated_at": "2017-07-03T03:06:42.428Z"
    }
]

This endpoint get list of zones.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones

URL Parameters

Parameter Description
ID The ID of the node to retrieve

Create Zone

You may create a zone using this action. It takes a JSON object containing a parameters.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
     --data-binary "{
    \"zone_name\": \"labs.com.my\",
    \"description\": \"this is new domain\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/50/zones'

The above command returns JSON structured like this:

{
    "id": 91,
    "view_id": 50,
    "zone_name": "labs.com.my",
    "description": "this is new domain",
    "zone_type": "master",
    "position": 5,
    "serial_number": null,
    "status": "active",
    "read_only": false,
    "processing_status": false,
    "backend_status": false,
    "delete_status": false,
    "write": false,
    "deleted_at": null,
    "created_at": "2017-07-11T10:22:22.567Z",
    "updated_at": "2017-07-11T10:22:22.567Z"
}

This endpoint create a zone.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones

Show Zone

You may list a zone using this action.

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/50/zones/91'

The above command returns JSON structured like this:

{
    "id": 91,
    "zone_name": "labs.com.my",
    "view_id": 50,
    "description": "this is new domain",
    "zone_type": "master",
    "status": "active",
    "processing_status": true,
    "backend_status": false,
    "delete_status": false,
    "position": 5,
    "serial_number": null,
    "created_at": "2017-07-11T10:22:22.567Z",
    "updated_at": "2017-07-11T10:22:22.598Z",
    "view": {
        "id": 50,
        "node_id": 2,
        "view_name": "cloudlocal",
        "description": "",
        "status": "active",
        "position": 0,
        "created_at": "2017-03-31T09:17:41.743Z",
        "updated_at": "2017-03-31T09:17:41.766Z"
    },
    "node": {
        "id": 2,
        "node_name": "dnsvnode1",
        "description": "this is node1",
        "tag": "agent",
        "fingerprint": "EF:41:67:B5:52:F7:1F:D2:67:B3:48:99:89:0C\n:6E:FE:F2:D7:5C:E5:34:38:14:26:1F:D3:D9:AD:02:2E:53:1C",
        "fingerprint_algorithm": "SHA256"
    }
}

This endpoint get list of zones.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:id

Show Zone Status

You may list a zone using this action.

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/50/zones/91'

The above command returns JSON structured like this:

{
    "id": 91,
    "zone_name": "labs.com.my",
    "view_id": 50,
    "description": "this is new domain",
    "zone_type": "master",
    "status": "active",
    "processing_status": true,
    "backend_status": false,
    "delete_status": false,
    "position": 5,
    "serial_number": null,
    "created_at": "2017-07-11T10:22:22.567Z",
    "updated_at": "2017-07-11T10:22:22.598Z",
    "view": {
        "id": 50,
        "node_id": 2,
        "view_name": "cloudlocal",
        "description": "",
        "status": "active",
        "position": 0,
        "created_at": "2017-03-31T09:17:41.743Z",
        "updated_at": "2017-03-31T09:17:41.766Z"
    },
    "node": {
        "id": 2,
        "node_name": "dnsvnode1",
        "description": "this is node1",
        "tag": "agent",
        "fingerprint": "EF:41:67:B5:52:F7:1F:D2:67:B3:48:99:89:0C\n:6E:FE:F2:D7:5C:E5:34:38:14:26:1F:D3:D9:AD:02:2E:53:1C",
        "fingerprint_algorithm": "SHA256"
    }
}

This endpoint get list of zones.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:id

Update Zone Status

You may update a zone using this action.

curl --include \
     --request PUT \
     --header "Content-Type: application/json" \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
     --data-binary "{
    \"node_name\": \"integer\",
    \"view_name\": \"internal\",
    \"zone_name\": \"amir.my\",
    \"zone\": 
        \"status\": \"true\",
        \"processing_status\": \"false\",
        \"backend_status\": \"true\",
        \"serial_number\": \"123123123\",
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/50/zones/update_status'

The above command returns JSON structured like this:

[
    {
      "view_id": 1,
      "zone_name": "amir.my",
      "description": "Amir's domain name",
      "zone_type": "master",
      "status": true,
      "processing_status": true,
      "backend_status": false,
      "delete_status": false,
      "boolean": false,
      "position": 1,
      "created_at": "2015-12-22T10:42:33.802Z",
      "updated_at": "2015-12-22T10:42:38.387Z"
    }
]

This endpoint get list of zones.

HTTP Request

PUT http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/update_status

Delete Zone

You may delete a zone using this action.

curl --include \
     --request DELETE \
     --header "Content-Type: application/json" \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/50/zones/91'

The above command returns JSON structured like this:

[
{
  "success": {
    "7005": "Zone has been deleted"
  }
}
]

This endpoint delete a zone.

HTTP Request

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:id

Zone Statement

List all Zone Statement

You may list collection of Zone Statement using this action.

curl --include \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/zones/1/statements'

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "statement": "match-clients",
        "negate": false,
        "position": 0,
        "value_type": "ip_address",
        "value": "1.1.1.1",
        "status": "active",
        "port": 53,
        "read_only": false,
        "created_at": "2017-07-11T03:50:18.530Z",
        "updated_at": "2017-07-11T03:50:18.530Z"
    }
]

This endpoint retrieves all statements.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:zone_id/statements

Show Zone Statement

You may view detail of a statement using this action.

curl --include \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/zones/1/statements/1'

The above command returns JSON structured like this:

{
    "id": 1,
    "statement": "match-clients",
    "negate": false,
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "status": "active",
    "port": 53,
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}

This endpoint retrieves detail of a statement.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:zone_id/statements/:id

Create Zone Statement

You may create a statement using this action. It takes a JSON object containing a parameters.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"type\": \"ip_address\",
    \"value\": \"12.1.1.1\",
    \"negate\": \"false\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/zones/1/statements'

The above command returns JSON structured like this:

{
    "id": 5,
    "node_id": 2,
    "statementable_id": 52,
    "statementable_type": "Dns::Zone",
    "statement": "allow-query",
    "position": 0,
    "value_type": "ip_address",
    "value": "12.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T08:54:25.603Z",
    "updated_at": "2017-07-11T08:54:25.603Z"
}

This endpoint creates a statement.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:zone_id/statements

Delete a Zone Statement

You may delete an statement using this action.

curl --include \
     --request DELETE \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/zones/22/statements/1'

The above command returns JSON structured like this:

{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}

This endpoint creates a statement.

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:zone_id/statements/:id

Delete multiple zone statements

You may delete multiple statements using this action.

curl --include \
     --request DELETE \
     --data-binary "{
    \"statements\": \"[6,7]\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/zones/2/statements/1'

The above command returns JSON structured like this:

[{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}]

This endpoint delete multiple statement.

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:zone_id/statements

Sort Zone Statement

You may sort statements using this action.

curl --include \
     --request PUT \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"statement\": [
        {
             \"statement_id\": 3
        },
        {
             \"position\": 0 
        }
    ]
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/zones/12/statements/sort'

The above command returns JSON structured like this:

[{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}]

This endpoint sort a statement.

PUT http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:zone_id/statements/sorts

Sort multiple zone statement

You may sort statements using this action.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"statement\": [
        {
             \"statement_id\": 3
        },
        {
             \"position\": 0 
        }
    ]
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/1/zones/22/statements/sort'

The above command returns JSON structured like this:

[{
    "id": 1,
    "node_id": 2,
    "statementable_id": 51,
    "statementable_type": "Dns::View",
    "statement": "match-clients",
    "position": 0,
    "value_type": "ip_address",
    "value": "1.1.1.1",
    "port": 53,
    "negate": false,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:50:18.530Z",
    "updated_at": "2017-07-11T03:50:18.530Z"
}]

This endpoint sort multiple statement.

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:zone_id/statements/sorts

Records

List all Records

You may list collection of zone using this action.

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
  'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/zones/1/records'

The above command returns JSON structured like this:

[
  {
    "id": 10,
    "host_id": null,
    "zone_id": 13,
    "rr_zone": "test05.my",
    "rr_host": "@",
    "rr_combine": "test05.my",
    "rr_ttl": "3600",
    "rr_type": "SOA",
    "rr_data": "a.dnsvault.net. amir.localhost.my. 1 86400 7200 3600000 3600",
    "status": true,
    "processing_status": true,
    "backend_status": false,
    "delete_status": false,
    "created_at": "2015-12-30T16:57:19.249Z",
    "updated_at": "2015-12-30T16:57:19.249Z"
  },
  {
    "id": 11,
    "host_id": null,
    "zone_id": 13,
    "rr_zone": "test05.my",
    "rr_host": "@",
    "rr_combine": "test05.my",
    "rr_ttl": "3600",
    "rr_type": "NS",
    "rr_data": "a.dnsvault.net.",
    "status": true,
    "processing_status": true,
    "backend_status": false,
    "delete_status": false,
    "created_at": "2015-12-30T16:57:19.259Z",
    "updated_at": "2015-12-30T16:57:19.259Z"
  },
  {
    "id": 12,
    "host_id": null,
    "zone_id": 13,
    "rr_zone": "test05.my",
    "rr_host": "sample1",
    "rr_combine": "sample1.test05.my.",
    "rr_ttl": "86400",
    "rr_type": "A",
    "rr_data": "2.2.2.101",
    "status": true,
    "processing_status": false,
    "backend_status": false,
    "delete_status": false,
    "created_at": "2015-12-30T16:59:18.802Z",
    "updated_at": "2015-12-30T16:59:18.802Z"
  },
  {
    "id": 13,
    "host_id": null,
    "zone_id": 13,
    "rr_zone": "test05.my",
    "rr_host": "sample1",
    "rr_combine": "sample1.test05.my.",
    "rr_ttl": "86400",
    "rr_type": "A",
    "rr_data": "2.2.2.109",
    "status": true,
    "processing_status": false,
    "backend_status": false,
    "delete_status": false,
    "created_at": "2015-12-30T17:00:32.953Z",
    "updated_at": "2015-12-30T17:00:32.953Z"
  }
]

This endpoint show all records.

HTTP Request

GET http://www.dnsvault.net/views/:view_id/zones/:zone_id/records

Show Record

Create Records

You may create multiple records for a host. After create you can check using dig tool, example: dig @srv1.dnsvault.net sample1.test05.my any

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"host\": \"sample1\",
    \"records\": [
        { \"type\":\"A\", \"data\":\"2.2.2.2\"},
        { \"ttl\":\"7200\", \"type\":\"MX\", \"data\":\"10 mail.server01.com.\"}
    ]
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/zones/1/records'

The above command returns JSON structured like this:

{
  "messages": {
    "success": [
      {
        "id": 14,
        "host_id": null,
        "zone_id": 13,
        "rr_zone": "test05.my",
        "rr_host": "sample1",
        "rr_combine": "sample1.test05.my.",
        "rr_ttl": null,
        "rr_type": "A",
        "rr_data": "2.2.2.2",
        "status": true,
        "processing_status": false,
        "backend_status": false,
        "delete_status": false,
        "created_at": "2015-12-30T17:54:09.796Z",
        "updated_at": "2015-12-30T17:54:09.796Z"
      },
      {
        "id": 15,
        "host_id": null,
        "zone_id": 13,
        "rr_zone": "test05.my",
        "rr_host": "sample1",
        "rr_combine": "sample1.test05.my.",
        "rr_ttl": "7200",
        "rr_type": "MX",
        "rr_data": "10 mail.server01.com.",
        "status": true,
        "processing_status": false,
        "backend_status": false,
        "delete_status": false,
        "created_at": "2015-12-30T17:54:10.197Z",
        "updated_at": "2015-12-30T17:54:10.197Z"
      }
    ],
    "errors": []
  }
}

This endpoint create multiple records.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:id/records

Create Record

You may create one records for a host. After create you can check using dig tool, example: dig @srv1.dnsvault.net sample1.test05.my any

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
     --data-binary "{
    \"host\": \"sample1\",
    \"record\": 
            {
                \"ttl\":3600,
                \"type\": \"A\",
                \"data\": \"2.2.2.2\"
            }
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/zones/1/record'

The above command returns JSON structured like this:

{
  "id": 74,
  "host_id": null,
  "zone_id": 28,
  "rr_zone": "amir.my",
  "rr_host": "sample1",
  "rr_combine": "sample1.amir.my.",
  "rr_ttl": "3600",
  "rr_type": "A",
  "rr_data": "2.2.2.2",
  "status": true,
  "processing_status": false,
  "backend_status": false,
  "delete_status": false,
  "created_at": "2016-01-11T13:17:28.871Z",
  "updated_at": "2016-01-11T13:17:28.871Z"
}

This endpoint create a record.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:id/record

Delete Records

Delete Record

You may delete records of host using this action. For testing you can use dig tool example: dig @srv1.dnsvault.net sample1.test05.my any

curl --include \
     --request DELETE \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"host\": \"sample1\",
    \"records\": [
        { \"type\":\"A\", \"data\":\"2.2.2.2\"},
        { \"ttl\":\"7200\", \"type\":\"MX\", \"data\":\"10 mail.server01.com.\"}
    ]
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/views/51/zones/1/records'

The above command returns JSON structured like this:

{
  "messages": {
    "success": [
      {
        "id": 14,
        "host_id": null,
        "zone_id": 13,
        "rr_zone": "test05.my",
        "rr_host": "sample1",
        "rr_combine": "sample1.test05.my.",
        "rr_ttl": "86400",
        "rr_type": "A",
        "rr_data": "2.2.2.2",
        "status": true,
        "processing_status": false,
        "backend_status": false,
        "delete_status": false,
        "created_at": "2015-12-30T17:54:09.796Z",
        "updated_at": "2015-12-30T17:54:09.796Z"
      }
    ],
    "errors": [
      {
        "host": "sample1",
        "error": "Record with type: MX and data: 10 mx.com. is not available, please try again."
      }
    ]
  }
}

This endpoint create a record.

HTTP Request

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/views/:view_id/zones/:id/records

Access Control List

List all Acls

You may list collection of ACL using this action. Default per page is 20.

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls'

The above command returns JSON structured like this:

[
  {
    "id": 2,
    "acl_name": "internal",
    "description": "This is for internal network",
    "status": true,
    "created_at": "2016-01-17T07:57:17.493Z",
    "updated_at": "2016-01-17T07:57:17.493Z"
  },
  {
    "id": 3,
    "acl_name": "ainternal",
    "description": "This is for internal network",
    "status": true,
    "created_at": "2016-01-17T08:05:18.939Z",
    "updated_at": "2016-01-17T08:05:18.939Z"
  }
]

This endpoint retrieves all acl.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls

Show Acl

You may show an ACL using this action.

curl --include \
     --header "Authorization: Token iwwTXK54aahsosrx5JK7hkTe" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls/36'

The above command returns JSON structured like this:

{
    "id": 36,
    "node_id": 2,
    "acl_name": "blacklist6",
    "description": "This is for internal network",
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T02:45:34.625Z",
    "updated_at": "2017-07-11T02:45:34.625Z"
}

This endpoint shows detail of an acl.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls/:id

Create Acl

You may create a ACL using this action. It takes a JSON object containing a parameters.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"acl_name\": \"blacklist6\",
    \"description\": \"This is for internal network\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls'

The above command returns JSON structured like this:

{
    "id": 36,
    "node_id": 2,
    "acl_name": "blacklist6",
    "description": "This is for internal network",
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T02:45:34.625Z",
    "updated_at": "2017-07-11T02:45:34.625Z"
}

This endpoint creates an acl.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls

Delete Acl

You may delete an ACL using this action.

curl --include \
     --request DELETE \
     --header "Content-Type: application/json" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls/36'

The above command returns JSON structured like this:

{
    "id": 36,
    "node_id": 2,
    "acl_name": "blacklist6",
    "description": "This is for internal network",
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T02:45:34.625Z",
    "updated_at": "2017-07-11T02:45:34.625Z"
}

This endpoint creates an acl.

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls/:id

Address Match List

List all Amls

You may list collection of AML using this action. Default per page is 20.

curl --include \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls/36/amls'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "acl_name_id": 2,
    "address": "1.1.1.1",
    "position": 1,
    "negate": false,
    "status": true,
    "read_only": false,
    "created_at": "2016-01-17T14:56:49.161Z",
    "updated_at": "2016-01-17T14:56:49.161Z"
  },
  {
    "id": 2,
    "acl_name_id": 2,
    "address": "192.168.1.0/24",
    "position": 2,
    "negate": false,
    "status": true,
    "read_only": false,
    "created_at": "2016-01-17T14:58:07.066Z",
    "updated_at": "2016-01-17T14:58:07.066Z"
  },
  {
    "id": 3,
    "acl_name_id": 2,
    "address": "192.168.0.0/16",
    "position": 3,
    "negate": false,
    "status": true,
    "read_only": false,
    "created_at": "2016-01-17T14:58:40.282Z",
    "updated_at": "2016-01-17T14:58:40.282Z"
  }
]

This endpoint retrieves all aml.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls/:acl_id/amls

Create Aml

You may create a AML using this action. It takes a JSON object containing a parameters.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "{
    \"address\": \"1.1.1.28\",
    \"negate\": \"true\"
}" \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls/30/amls'

The above command returns JSON structured like this:

{
    "id": 24,
    "acl_id": 30,
    "value_type": null,
    "value": null,
    "address": "1.1.1.28",
    "position": 1,
    "negate": true,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:06:24.184Z",
    "updated_at": "2017-07-11T03:06:24.184Z"
}

This endpoint creates an aml.

HTTP Request

POST http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls/:acl_id/amls

Show Aml

You may list collection of AML using this action. Default per page is 20.

curl --include \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls/30/amls/24'

The above command returns JSON structured like this:

{
    "id": 24,
    "acl_id": 30,
    "address": "1.1.1.28",
    "position": 1,
    "negate": true,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:06:24.184Z",
    "updated_at": "2017-07-11T03:06:24.184Z"
}

This endpoint retrieves an aml.

HTTP Request

GET http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls/:acl_id/amls/:id

Delete Aml

You may delete an AML using this action.

curl --include \
     --request DELETE \
'http://www.dnsvault.net/api/v1/nodes/2/dns/acls/30/amls/24'

The above command returns JSON structured like this:

{
    "id": 24,
    "acl_id": 30,
    "address": "1.1.1.28",
    "position": 1,
    "negate": true,
    "status": "active",
    "read_only": false,
    "created_at": "2017-07-11T03:06:24.184Z",
    "updated_at": "2017-07-11T03:06:24.184Z"
}

This endpoint delete an aml.

HTTP Request

DELETE http://www.dnsvault.net/api/v1/nodes/:node_id/dns/acls/:acl_id/amls/:id

Errors

The DNSVault API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request sucks
401 Unauthorized – Your API key is wrong
403 Forbidden – The kitten requested is hidden for administrators only
404 Not Found – The specified kitten could not be found
405 Method Not Allowed – You tried to access a kitten with an invalid method
406 Not Acceptable – You requested a format that isn’t json
410 Gone – The kitten requested has been removed from our servers
418 I’m a teapot
429 Too Many Requests – You’re requesting too many kittens! Slow down!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarily offline for maintenance. Please try again later.