Summary:
List details of, modify, or delete a specifed zone.
URL:
http(s)://{server hostname}/api/zones/{zoneID}
Methods summary
- GET Method - details information about the zone.
- PUT Method - modifies parameters of the zone.
- DELETE Method - deletes the zone.
GET Method detail
Returns a detailed information about the zone.
Response:
User info structure with the following format:
Name | Description |
---|---|
id | zone ID. |
name | zone name. |
flags | zone flags. |
description | description of the zone. |
v4interface | IPv4 interface for the zone. |
v6interface | IPv6 interface for the zone. |
domainSuffix | Domain suffix for the zone. |
proxy | (this is unused.) |
devicePrefix | specified device prefix that is included with each device name found under this zone, maximum of 5 characters. |
hostFile | host file. |
dnsServer | list of DNS servers. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/zones/1?media=json
OUTPUT
{
"id": 1,
"name": "A",
"flags": 0,
"description": "",
"v4Interface": "10.44.2.103",
"v6Interface": "",
"domainSuffix": "",
"proxy": "",
"devicePrefix": "",
"hostFile": "",
"dnsServers": [
"a.b.c.d"
]
}
INPUT
curl -u admin:admin https://localhost/api/zones/1?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<zoneParametersInfo id="1">
<name>A</name>
<flags>0</flags>
<description></description>
<v4Interface>10.44.2.103</v4Interface>
<v6Interface></v6Interface>
<domainSuffix></domainSuffix>
<proxy></proxy>
<devicePrefix></devicePrefix>
<hostFile></hostFile>
<dnsServers>
<server>a.b.c.d</server>
</dnsServers>
</zoneParametersInfo>
PUT Method detail
Modifies parameters of the zone.
Request:
Same as 'GET Method - Response' above.
Response:
Detailed information about the zone after changes, as 'GET Method' above would return it.
Examples:
INPUT
curl -u admin:admin https://localhost/api/zones/ 1?media=json -X PUT -H "content-type:application/json" -d \
'{
"name": "B",
"v6Interface": "fe80:0:0:0:0:5efe:a2c:266",
"dnsServers": [
"t.x.y.z"
]
}'
OUTPUT
{
"id": 1,
"name": "B",
"flags": 0, "description": "",
"v4Interface": "10.44.2.103",
"v6Interface": "fe80:0:0:0:0:5efe:a2c:266",
"domainSuffix": "",
"proxy": "",
"devicePrefix": "",
"hostFile": "",
"dnsServers": [
"t.x.y.z"
]
}
INPUT
curl -u admin:admin https://localhost/api/zones/1?media=xml-X PUT -H "content-type:application/xml" -d \
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<zoneParametersInfo id="1">
<name>Zone B</name>
<v6Interface>fe80:0:0:0:0:5efe:a2c:266</v6Interface>
<dnsServers>
<server>t.x.y.z</server>
</dnsServers>
</zoneParametersInfo>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<zoneParametersInfo id="1">
<name>B</name>
<flags>0</flags>
<description></description>
<v4Interface>10.44.2.103</v4Interface>
<v6Interface></v6Interface>
<domainSuffix></domainSuffix>
<proxy></proxy>
<devicePrefix></devicePrefix>
<hostFile></hostFile>
<dnsServers>
<server>t.x.y.z</server>
</dnsServers>
</zoneParametersInfo>
DELETE Method detail
Deletes a zone.
Response:
The current list of zones, as the GET method would return it.
Examples:
INPUT
curl -u admin:admin https://localhost/api/zones/1?media=json -X DELETE
OUTPUT
{
"message" : "Zone deleted successfully"
}
INPUT
curl -u admin:admin https://localhost/api/zones/1?media=xml -X DELETE
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusInfo>
<message>Zone deleted successfully</message>
</statusInfo>
Comments
0 comments
Please sign in to leave a comment.