Show a Zone

Overview

  • Show a zone.

Classification

  • Show

API Operation Object

  • Zone

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{api_endpoint}/v2/zones/{zone_id}

HTTP Request Header

Format

Content-Type: application/json
Accept: application/json
X-Auth-Token: <token_id>

HTTP Request Body

  • none

Request Parameter

name style format description required/optional default value action for invalid parameter response code for invalid parameter
token_id header authentication token string authentication token. required - Terminate 401
zone_id path uuid ID for the zone. required - Terminate 404

Response

HTTP Response Header

Format

HTTP/1.1 <response_code>       (ex. 200)
  • <response_code>: see "Response Code" section

Response Code

response code status condition message
200 OK normal end  
404 Not Found   E2007 Specified zone is not found.
401 Unauthorized authentication failure E2001 Invalid token.
500 Internal Server Error internal server error E9001 Internal Server Error. Request failed.

Response Body

Format

{
  "id": <id>,
  "pool_id": <pool_id>,
  "project_id": <project_id>,
  "name": <name>,
  "email": <email>,
  "ttl": <ttl>,
  "serial": <serial>,
  "status": <status>,
  "description": <description>,
  "masters": <masters>,
  "type": <type>,
  "transferred_at": <transferred_at>,
  "version": <version>,
  "created_at": <created_at>,
  "updated_at": <updated_at>,
  "links": {
     <links>
  }
}

Response Parameter

item format description
id uuid ID for the resource
pool_id uuid ID for the pool hosting this zone. This parameter is not currently supported. It always returns an empty string.
project_id uuid ID for the project(tenant) that owns the resource.
name zonename DNS Name for the zone
email string e-mail for the zone. Used in SOA records for the zone. This parameter is not currently supported. It always returns an empty string.
ttl integer TTL (Time to Live) for the zone. This parameter is not currently supported. it always return zero.
serial integer current serial number for the zone. This parameter is not currently supported. it always return zero.
status enum status of the resource.
description string Description for this zone.
masters enum list For secondary zones. The servers to slave from to get DNS information. This parameter is not currently supported. It always returns an empty string.
type enum Type of zone. PRIMARY is controlled by SDPF DNS, SECONDARY zones are slaved from another DNS Server. Defaults to PRIMARY. This parameter is not currently supported. It always returns an empty string.
transferred_at enum For secondary zones. The last time an update was retrieved from the master servers. This parameter is not currently supported. it always return null.
version integer Version of the resource. This parameter is not currently supported. it always return 1.
created_at datestamp Date / Time when resource was created.
updated_at datestamp Date / Time when resource last updated.
links links Links to the resource, and other related resources. When a response has been broken into pages, we will include a next link that should be followed to retrieve all results.

Sample Request and Response

Sample API Request

Request URL

GET /v2/zones/fbe8562b-66a5-4071-b4c2-250487d15a81

Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: e8c788fbaeb14964ae19759eb1df4ff1

Request Body

  • none

Sample API Response

Response Header

HTTP/1.1 200
Date: Mon, 24 Oct 2016 04:05:42 GMT
Content-Type: application/json
Content-Length: 443
Connection: keep-alive
Set-Cookie: TS0183560f=01cce65ce1b1f142240c6677f2fd7fe62009f60df7b158f2330528786114882f9c5424f818; Path=/

Response Body

{
  "id": "fbe8562b-66a5-4071-b4c2-250487d15a81",
  "pool_id": "",
  "project_id": "9348360ee0984a85a54e188a34c94851",
  "name": "example.uk.",
  "email": "",
  "ttl": 0,
  "serial": 0,
  "status": "ACTIVE",
  "description": "This is a test zone.",
  "masters": [],
  "type": "",
  "transferred_at": null,
  "version": 1,
  "created_at": "2016-10-24T03:36:01",
  "updated_at": "2016-10-24T03:36:05",
  "links": {
    "self": "https://endpoint.api.example.com/v2/zones/fbe8562b-66a5-4071-b4c2-250487d15a81"
  }
}

Sample Error Response

Response

HTTP/1.1 404
Date: Mon, 24 Oct 2016 04:08:22 GMT
Content-Type: application/json
Content-Length: 89
Connection: keep-alive
Set-Cookie: TS0183560f=01cce65ce1493cb244e5e25514e4272790bcb37941ad21cb1990a014a0c9e9a1c112d13026; Path=/

{"error":{"code":404,"title":"Not Found","message":"E2007 Specified zone is not found."}}