Domains : List
Omschrijving
Haal lijst op met alle DNS templates uit het accountEndpoint
GET https://api.nextname.nl/v2/dns/templates
URL parameters
Bekijk voor meer informatie over de mogelijke zoekwaarden en de pagina: Zoekopdrachten| Parameter | Datatype | Omschrijving |
|---|---|---|
| template_id | String | Zoekwaarde voor de unieke ID van de DNS template |
| template_name | String | Zoekwaarde voor de naam van de DNS template |
| date_created | Datetime | Zoekwaarde voor de datum waarop de template werd aangemaakt, formaat: YYYY-MM-DDThh:mm:ssZ in UTC tijdzone in RFC 3339 |
| date_last_updated | Datetime | Zoekwaarde voor de datum waarop de template voor het laatst werd gewijzig, formaat: YYYY-MM-DDThh:mm:ssZ in UTC tijdzone in RFC 3339 |
| ttl | Integer | Zoekwaarde voor de TTL (Time To Live) van de DNS template |
| connections | Integer | Zoekwaarde voor het aantal gekoppelde domeinnamen aan de DNS template |
Antwoord
HTTP status code: 200 Ok
| Parameter | Type | Omschrijving |
|---|---|---|
| Array: data[] met object: | ||
| template_id | String | Unieke ID van de template |
| template_name | String | Naam van de template |
| date_created | Datetime | Datum en tijdstip waarop de template werd aangemaakt in UTC tijdzone in RFC 3339 |
| date_last_updated | Datetime | Datum en tijdstip waarop de template voor het laatst werd aangepast in UTC tijdzone in RFC 3339 |
| ttl | Integer | TTL (Time To Live) van de DNS template |
| connections | Integer | Het aantal domeinnamen dat aan de template is gekoppeld |
| Object: pagination | ||
| current_page | Integer | Huidige pagina |
| per_page | Integer | Aantal resultaten per pagina |
| total_pages | Integer | Totaal aantal pagina's |
| total_results | Integer | Totaal aantal resultaten |
Voorbeelden
Beschrijving:
Haal lijst met DNS templates op
Opdracht in PHP:
<?php
$env = "live"; // live or test
$api_key = "XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$api_url = "/v2/dns/templates";
$api_host = $env === "live" ? "https://api.nextname.nl" : "https://api-test.nextname.nl";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_host . $api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer $api_key"));
$output = curl_exec($ch);
curl_close($ch);
echo $output;
Opdracht in cURL:
curl -H "Authorization: Bearer XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ https://api-test.nextname.nl/v2/dns/templates
HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8
{
"data": [
{
"template_id": "5b79ee68496d73044",
"template_name": "parked-domains",
"date_created": "2022-03-22T12:54:15Z",
"date_last_updated": null,
"ttl": 7200,
"connections": 14
},
{
"template_id": "48df0d8f3f63aed3",
"template_name": "webserver-1",
"date_created": "2020-01-18T11:48:33Z",
"date_last_updated": "2022-12-05T13:15:43Z",
"ttl": 3600,
"connections": 123
},
{
"template_id": "5745f0ac137d78ef",
"template_name": "email-only",
"date_created": "2020-01-18T12:30:25Z",
"date_last_updated": null,
"ttl": 7200,
"connections": 45
},
{
"template_id": "859559bf574aa203",
"template_name": "webshops-1",
"date_created": "2018-06-17T14:35:57Z",
"date_last_updated": "2021-09-17T12:22:01Z",
"ttl": 3600,
"connections": 23
},
],
pagination": {
"page": 1,
"per_page": 50,
"total_pages": 1,
"total_results": 4
}
}
Beschrijving:
Haal een lijst met DNS templates op die aan meer dan 25 domeinnamen zijn gekoppeld
Opdracht in PHP:
<?php
$env = "live"; // live or test
$api_key = "XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$api_url = "/v2/dns/templates?connections=>25";
$api_host = $env === "live" ? "https://api.nextname.nl" : "https://api-test.nextname.nl";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_host . $api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer $api_key"));
$output = curl_exec($ch);
curl_close($ch);
echo $output;
Opdracht in cURL:
curl -H "Authorization: Bearer XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ "https://api-test.nextname.nl/v2/dns/templates?connections=>25"
HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8
{
"data": [
{
"template_id": "48df0d8f3f63aed3",
"name": "webserver-1",
"date_created": "2020-01-18T11:48:33Z",
"date_last_updated": "2022-12-05T13:15:43Z",
"ttl": 3600,
"connections": 123
},
{
"template_id": "5745f0ac137d78ef",
"name": "email-only",
"date_created": "2020-01-18T12:30:25Z",
"date_last_updated": null,
"ttl": 7200,
"connections": 45
},
],
pagination": {
"page": 1,
"per_page": 50,
"total_pages": 1,
"total_results": 2
}
}