/dns/domain_templates/list_records
GET https://api.sitehost.nz/1.0/dns/domain_templates/list_records.json
Lists all records within a template.
Query Parameters
Parameter | Type | Required | Description |
client_id | integer | Yes | The ID for the client.Example: 1 |
template_id | integer | Yes | The template ID number.Example: 12 |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/dns/domain_templates/list_records.json?apikey=your_key_here&client_id=1&template_id=12", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/dns/domain_templates/list_records.json?apikey=your_key_here&client_id=1&template_id=12");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'
uri = URI.parse("https://api.sitehost.nz/1.0/dns/domain_templates/list_records.json?apikey=your_key_here&client_id=1&template_id=12")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
import requests
uri = 'https://api.sitehost.nz/1.0/dns/domain_templates/list_records.json?apikey=your_key_here&client_id=1&template_id=12'
response = requests.get(uri)
Response
200:application/json
{
"return": [
{
"id": "1459",
"name": "@",
"type": "NS",
"content": "ns1.sitehost.co.nz.",
"prio": "0",
"change_date": "1461119775"
},
{
"id": "1460",
"name": "@",
"type": "NS",
"content": "ns2.sitehost.co.nz.",
"prio": "0",
"change_date": "1461119775"
},
{
"id": "1461",
"name": "@",
"type": "NS",
"content": "ns3.sitehost.co.nz.",
"prio": "0",
"change_date": "1461119775"
},
{
"id": "1462",
"name": "subdomain",
"type": "A",
"content": "1.1.1.1",
"prio": "0",
"change_date": "1461119775"
}
],
"msg": "Successful.",
"status": true,
"time": 11.15
}
"return": [
{
"id": "1459",
"name": "@",
"type": "NS",
"content": "ns1.sitehost.co.nz.",
"prio": "0",
"change_date": "1461119775"
},
{
"id": "1460",
"name": "@",
"type": "NS",
"content": "ns2.sitehost.co.nz.",
"prio": "0",
"change_date": "1461119775"
},
{
"id": "1461",
"name": "@",
"type": "NS",
"content": "ns3.sitehost.co.nz.",
"prio": "0",
"change_date": "1461119775"
},
{
"id": "1462",
"name": "subdomain",
"type": "A",
"content": "1.1.1.1",
"prio": "0",
"change_date": "1461119775"
}
],
"msg": "Successful.",
"status": true,
"time": 11.15
}