Zones

List Zones

Returns all Zones.

Use the provided URI parameters to modify the result.

get/zones

Request

  • Base URL: https://api.hetzner.cloud/v1
  • URL: https://api.hetzner.cloud/v1/zones
  • Auth: HTTP bearer

Query parameters

namestring

Filter resources by their name.

The response will only contain the resources matching exactly the specified name.

mode'primary' | 'secondary'

Mode of the Zone.

For more information, see Zone Modes.

Example:primary

Filter resources by their mode.

The response will only contain the resources matching exactly the specified mode.

label_selectorstring

Filter resources by labels.

The response will only contain resources matching the label selector. For more information, see "Label Selector".

sortstring[]

Sort resources by field and direction. May be used multiple times.

For more information, see "Sorting".

pageinteger
Example:1

Page number to return. For more information, see "Pagination".

per_pageinteger
Example:25

Maximum number of entries returned per page. For more information, see "Pagination".

Response

Request succeeded.

Example response

{
  "zones": [
    {
      "id": 42,
      "name": "example.com",
      "created": "2016-01-30T23:55:00Z",
      "primary_nameservers": [
        {
          "address": "198.51.100.1",
          "port": 53
        },
        {
          "address": "203.0.113.1",
          "port": 53
        }
      ],
      "labels": {
        "environment": "prod",
        "example.com/my": "label",
        "just-a-key": ""
      },
      "ttl": 10800,
      "authoritative_nameservers": {
        "assigned": [
          "hydrogen.ns.hetzner.com.",
          "oxygen.ns.hetzner.com.",
          "helium.ns.hetzner.de."
        ],
        "delegated": [
          "hydrogen.ns.hetzner.com.",
          "oxygen.ns.hetzner.com.",
          "helium.ns.hetzner.de."
        ],
        "delegation_last_check": "2016-01-30T23:55:00Z"
      },
      "mode": "primary"
    }
  ],
  "meta": {
    "pagination": {
      "page": 3,
      "per_page": 25,
      "previous_page": 2,
      "next_page": 4,
      "last_page": 4,
      "total_entries": 100
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.