/dns/domain_templates/get_template
GET https://api.sitehost.nz/1.0/dns/domain_templates/get_template.json
Returns the details for 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: 15 |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/dns/domain_templates/get_template.json?apikey=your_key_here&client_id=1&template_id=15", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/dns/domain_templates/get_template.json?apikey=your_key_here&client_id=1&template_id=15");
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/get_template.json?apikey=your_key_here&client_id=1&template_id=15")
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/get_template.json?apikey=your_key_here&client_id=1&template_id=15'
response = requests.get(uri)
Response
200:application/json
{
"return": [
{
"template_id": "168",
"client_id": "1",
"template_name": "New Template",
"nameserver": "ns1.sitehost.co.nz",
"email": "example@example.com",
"refresh": "3600",
"retry": "3600",
"expire": "3600",
"min": "3600",
"domain_count": "0"
}
],
"msg": "Successful.",
"status": true,
"time": 30.02
}
"return": [
{
"template_id": "168",
"client_id": "1",
"template_name": "New Template",
"nameserver": "ns1.sitehost.co.nz",
"email": "example@example.com",
"refresh": "3600",
"retry": "3600",
"expire": "3600",
"min": "3600",
"domain_count": "0"
}
],
"msg": "Successful.",
"status": true,
"time": 30.02
}