Querying the Public Zones
Function
This API is used to query information about all public zones. The information includes the domain name, zone ID, status, number of record sets, enterprise project, tags, TTL, creation time, modification time, and description.
Calling Method
For details, see Calling APIs.
URI
GET /v2/zones
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition The user token. The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. For details about how to obtain a user token, seeObtaining a User Token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
links |
pageLink object |
Definition The link to the current page or other pages. When a response is broken into pages, a next link is provided to point to the next page. Range N/A |
zones |
Array of PublicZoneResp objects |
Definition Response to the request for querying public zones Range N/A |
metadata |
metadata object |
Definition Number of resources that meet the filter condition Range N/A |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition Zone ID, which is a UUID used to identify the zone Range N/A |
name |
String |
Definition The domain name. Range Enter multiple labels separated by periods (.). Use only letters, digits, and hyphens (-). Do not start or end with a hyphen (-). Max label length: 63 characters. Max total: 254 characters. |
description |
String |
Definition The description of the zone. Range The value can contain a maximum of 255 characters. |
|
String |
Definition Email address of the administrator who manages the zone. The email address is used to generate the SOA record set of the zone. Range N/A |
zone_type |
String |
Definition Zone type Range public: Public zone |
ttl |
Integer |
Definition The TTL specified in the SOA record in the zone. It is measured in seconds. Range 1 to 2147483647 |
serial |
Integer |
Definition Sequence number used to identify zone file changes in the SOA record set of the zone. The sequence number is used for synchronization between the primary and secondary nodes. Range N/A |
status |
String |
Definition The status of the public zone. Range |
record_num |
Integer |
Definition Number of record sets for the zone Range N/A |
pool_id |
String |
Definition Pool ID of the zone, which is assigned by the system Range N/A |
project_id |
String |
Definition Project ID of the zone Range N/A |
created_at |
String |
Definition The time when a zone was created. Format: yyyy-MM-dd'T'HH:mm:ss.SSS Range N/A |
updated_at |
String |
Definition The time when the zone was last modified. Format: yyyy-MM-dd'T'HH:mm:ss.SSS Range N/A |
links |
pageLink object |
Definition The link to the current page or other pages. When a response is broken into pages, a next link is provided to point to the next page. Range N/A |
tags |
Array of tag objects |
Definition Resource tag Range N/A |
masters |
Array of strings |
Definition Primary DNS servers, from which the secondary DNS servers get DNS information Range N/A |
enterprise_project_id |
String |
Definition The ID of the enterprise project to which the zone belongs. This parameter is used to filter the zones under an enterprise project. Range The value is 0 or a string that contains a maximum of 36 characters in UUID format with hyphens (-). 0 indicates the default enterprise project. |
Parameter |
Type |
Description |
---|---|---|
self |
String |
Definition The link to the current page. Range N/A |
next |
String |
Definition The link to the next page. Range N/A |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Definition The tag key. Range |
value |
String |
Definition The tag value. Range |
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Definition Number of resources that meet the filter criteria. The number is irrelevant to limit or offset. Range N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Example Requests
Querying the public zones
GET https://{endpoint}/v2/zones?type=public&limit=10
Example Responses
Status code: 200
Successful request
{ "links" : { "self" : "https://Endpoint/v2/zones?type=public&limit=10", "next" : "https://Endpoint/v2/zones?type=public&limit=10&marker=2c9eb155587194ec01587224c9f90149" }, "zones" : [ { "id" : "2c9eb155587194ec01587224c9f90149", "name" : "example.com.", "description" : "This is an example zone.", "email" : "xx@example.com", "ttl" : 300, "serial" : 0, "masters" : [ ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149" }, "pool_id" : "00000000570e54ee01570e9939b20019", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "public", "created_at" : "2016-11-17T11:56:03.439", "updated_at" : "2016-11-17T11:56:05.528", "record_num" : 2 }, { "id" : "2c9eb155587228570158722996c50001", "name" : "example.org.", "description" : "This is an example zone.", "email" : "xx@example.org", "ttl" : 300, "serial" : 0, "masters" : [ ], "status" : "PENDING_CREATE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587228570158722996c50001" }, "pool_id" : "00000000570e54ee01570e9939b20019", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "public", "created_at" : "2016-11-17T12:01:17.996", "updated_at" : "2016-11-17T12:01:18.528", "record_num" : 2 } ], "metadata" : { "total_count" : 2 } }
Status Codes
Status Code |
Description |
---|---|
200 |
Successful request |
400 |
Error response |
404 |
Error response |
500 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.