Domain objects

The VisualDNS REST Records API let's you:

  • list a domain records.

  • create new ones.

  • or delete any domain records that belongs to your domains.

Authentication

Authentication is managed using your API Key, which must be included in the auth_token parameter for every call.

The authentication key can be reset from your user profile at any time

Supported Formats

json

Supported Formats

json

Errors

401 Unauthorized
422 Bad parameter
404 Not found
500 Server crashed for some reason

Examples

GET /api/v1/domains/1/records/?auth_token=NyC8zBgkXHF7qg6wp4gB
200
[
  {
    "change_date": null,
    "content": "ns0.visualdns.net dns@visualdns.net 1",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 1,
    "name": "domain29.com",
    "prio": null,
    "ttl": 10000,
    "type": "SOA",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "ns0.visualdns.net",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 2,
    "name": "domain29.com",
    "prio": null,
    "ttl": 10000,
    "type": "NS",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "ns1.visualdns.net",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 3,
    "name": "domain29.com",
    "prio": null,
    "ttl": 10000,
    "type": "NS",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "ns2.visualdns.net",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 4,
    "name": "domain29.com",
    "prio": null,
    "ttl": 10000,
    "type": "NS",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "ns3.visualdns.net",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 5,
    "name": "domain29.com",
    "prio": null,
    "ttl": 10000,
    "type": "NS",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "1.1.1.1",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 6,
    "name": "domain29.com",
    "prio": null,
    "ttl": 1000,
    "type": "A",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "1.1.1.1",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 7,
    "name": "www.domain29.com",
    "prio": null,
    "ttl": 1000,
    "type": "A",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "domain29.com",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 8,
    "name": "ftp.domain29.com",
    "prio": null,
    "ttl": 10000,
    "type": "CNAME",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "domain29.com",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 9,
    "name": "mail.domain29.com",
    "prio": null,
    "ttl": 10000,
    "type": "CNAME",
    "updated_at": "2013-02-28T17:49:31+01:00"
  },
  {
    "change_date": null,
    "content": "domain29.com",
    "created_at": "2013-02-28T17:49:31+01:00",
    "domain_id": 1,
    "id": 10,
    "name": "domain29.com",
    "prio": 10,
    "ttl": 1000,
    "type": "MX",
    "updated_at": "2013-02-28T17:49:31+01:00"
  }
]

Params

Param name Description
auth_token
required

API authentication key


Value: Must be String

POST /api/v1/domains/:domain_id/records
Create a record inside a domain

Supported Formats

json

Errors

401 Unauthorized
422 Bad parameter
404 Not found
500 Server crashed for some reason

Examples

POST /api/v1/domains/1/records/
auth_token=RDzmeQgUG7scYE3BSUuP&record[name]=xxxx.domain36.com&record[type]=A&record[content]=1.2.3.4&record[ttl]=100000
201
{
  "change_date": null,
  "content": "1.2.3.4",
  "created_at": "2013-02-28T17:49:32+01:00",
  "domain_id": 1,
  "id": 11,
  "name": "xxxx.domain36.com",
  "prio": null,
  "ttl": 100000,
  "type": "A",
  "updated_at": "2013-02-28T17:49:32+01:00"
}
POST /api/v1/domains/1/records/
auth_token=yMTwRXm6eYsLHwrrPvdQ&record[name]=xxxxdomain40.com&record[type]=A&record[content]=1.2.3.4&record[ttl]=100000
422
{
  "errors": {
    "name": [
      "You can't setup record names out of your domain name"
    ]
  }
}

Params

Param name Description
auth_token
required

API authentication key


Value: Must be String
record
required

Value: Must be a Hash
record[name]
required

record name


Value: Must be String
record[ttl]
required

Time To Live of the record


Value: Must be Fixnum
record[type]
required

record type: A, MX, SOA, NS, PTR, etc…


Value: Must be String
record[content]
required

record content, validation depends on the record type


Value: Must be String

GET /api/v1/domains/:domain_id/records/:id
Get domain's record information

Supported Formats

json

Errors

401 Unauthorized
422 Bad parameter
404 Not found
500 Server crashed for some reason

Examples

GET /api/v1/domains/1/records/10?auth_token=zNGqcTmqnv8VHkhdQcRD
200
{
  "change_date": null,
  "content": "domain34.com",
  "created_at": "2013-02-28T17:49:32+01:00",
  "domain_id": 1,
  "id": 10,
  "name": "domain34.com",
  "prio": 10,
  "ttl": 1000,
  "type": "MX",
  "updated_at": "2013-02-28T17:49:32+01:00"
}

Params

Param name Description
auth_token
required

API authentication key


Value: Must be String

Supported Formats

json

Errors

401 Unauthorized
422 Bad parameter
404 Not found
500 Server crashed for some reason

Examples

PUT /api/v1/domains/1/records/10
auth_token=SSpFBqRJe99KEGG6Hdqp&record[content]=mysmtp.es&record[type]=MX&record[ttl]=100000
204
PUT /api/v1/domains/1/records/10
auth_token=jMEs6wD7qhsxqbCoR1zr&record[content]=mysmtp.es&record[type]=MXBAD&record[ttl]=10
422
{
  "errors": {
    "type": [
      "is not included in the list"
    ]
  }
}

Params

Param name Description
auth_token
required

API authentication key


Value: Must be String
record
required

Value: Must be a Hash
record[name]
required

record name


Value: Must be String
record[ttl]
required

Time To Live of the record


Value: Must be Fixnum
record[type]
required

record type: A, MX, SOA, NS, PTR, etc…


Value: Must be String
record[content]
required

record content, validation depends on the record type


Value: Must be String

Supported Formats

json

Errors

401 Unauthorized
422 Bad parameter
404 Not found
500 Server crashed for some reason

Examples

DELETE /api/v1/domains/1/records/10
auth_token=AsByA7TjFnCpMN5fJp4D
204

Params

Param name Description
auth_token
required

API authentication key


Value: Must be String
Free DNS // dynamic IP DNS service // 24/7 Service // Plans with extra features //
hiya!