/dns/list_domains_using_template
GET https://api.sitehost.nz/1.0/dns/list_domains_using_template.json
Lists all domains using a specific template.
Query Parameters
Parameter | Type | Required | Description |
client_id | integer | Yes | The ID for the client that the domains belong to.Example: 1 |
template_id | integer | Yes | The template id number.Example: 1 |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/dns/list_domains_using_template.json?apikey=your_key_here&client_id=1&template_id=1", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/dns/list_domains_using_template.json?apikey=your_key_here&client_id=1&template_id=1");
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/list_domains_using_template.json?apikey=your_key_here&client_id=1&template_id=1")
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/list_domains_using_template.json?apikey=your_key_here&client_id=1&template_id=1'
response = requests.get(uri)
Response
200:application/json
{
"return": {
"example.com": {
"domain_id": "1103",
"client_id": "1",
"domain": "example.com",
"domain_r": "moc.elpmaxe",
"date_created": "0000-00-00 00:00:00",
"template_id": "165",
"allow_children": "0",
"cdn_zone": null
}
},
"msg": "Successful.",
"status": true,
"time": 11.01
}
"return": {
"example.com": {
"domain_id": "1103",
"client_id": "1",
"domain": "example.com",
"domain_r": "moc.elpmaxe",
"date_created": "0000-00-00 00:00:00",
"template_id": "165",
"allow_children": "0",
"cdn_zone": null
}
},
"msg": "Successful.",
"status": true,
"time": 11.01
}