Updated on 2024-03-25 GMT+08:00

Querying a Public Zone

Function

This API is used to query a public zone.

Calling Method

For details, see Calling APIs.

URI

GET /v2/zones/{zone_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

zone_id

Yes

String

Zone ID

Minimum: 32

Maximum: 36

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Zone ID

name

String

Zone name

description

String

Zone description

email

String

Mailbox of the administrator managing the zone

zone_type

String

Zone type. The value is public.

ttl

Integer

TTL value of the SOA record set in the zone

serial

Integer

Sequence number used to identify zone file changes in the SOA record set of the zone, which is used for synchronization between the master and slave nodes.

status

String

Resource Status

record_num

Integer

Number of record sets in a zone

pool_id

String

Pool that hosts the zone. The pool is assigned by the system.

created_at

String

Time when the zone was created

updated_at

String

Time when the zone was updated

enterprise_project_id

String

ID of the enterprise project associated with the zone. The value contains a maximum of 36 characters.

masters

Array of strings

Master DNS servers, from which the slave servers get DNS information

links

pageLink object

Link of the current resource or other related resources. When a response is broken into pages, a next link is provided to retrieve all results.

project_id

String

Project ID of the zone

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Example Requests

None

Example Responses

Status code: 200

Response

{
  "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,
  "enterprise_project_id" : "0"
}

Status Codes

Status Code

Description

200

Response

400

Error response

404

Error response

500

Error response

Error Codes

See Error Codes.