# API: Get zone details
# getDNSZoneDetails
Requires DNS Zone editor plugin to be added and active in HostBill. Because the DNS Zone can be edited from other sources than the API, we must not keep any records saved of the DNS zone itself. We must fetch the zone every time we want to interact with it. Getting the zone details will create a JSON object that we can use to populate the table where our users will see the DNS information.
# Required parameters
Parameter | Description |
---|---|
app_id | App ID |
zone_id | Zone ID |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=getDNSZoneDetails&app_id=APP_ID&zone_id=ZONE_ID
# PHP Samples
# Response
{
"success": true,
"zone": {
"id": "3",
"name": "testcreate.com.",
"domain": "testcreate.com.",
"records": {
"SOA": [
{
"name": "testcreate.com.",
"type": "SOA",
"ttl": 7200,
"content": [
"ns1.hostbill.com.",
"email.example.com.",
"2021060402",
"10800",
"3600",
"1814400",
"7200"
],
"priority": 0,
"change_date": 0,
"id": "c9a6604c2d520d49e516ec72536c8995"
}
],
"NS": [
{
"name": "testcreate.com.",
"type": "NS",
"ttl": 3600,
"content": "ns1.hostbill.com.",
"priority": 0,
"change_date": 0,
"id": "9105ac3f89f4472d0204c16104e8eedd"
},
{
"name": "testcreate.com.",
"type": "NS",
"ttl": 3600,
"content": "ns2.hostbill.com.",
"priority": 0,
"change_date": 0,
"id": "ab0a640548f07dc35ebab0585421f85f"
}
]
}
},
"call": "getDNSZoneDetails",
"server_time": 1622815641,
"info": [
"Zone details"
]
}