# Zone List
## Endpoint
`/api/zones/list`
## Method
GET
## Description
List all authoritative zones hosted on this DNS server. The list contains only the zones that the user has View permissions for.
## Authentication
Token required.
## Parameters
| `token` | string | Yes | - | Session token from `login` or `createToken`. |
| `node` | string | No | - | Node domain name for clustering. When unspecified, the current node is used. Only usable when Clustering is initialized. |
| `pageNumber` | integer | No | - | When specified, the API returns paginated results. When not specified, returns all zones. |
| `zonesPerPage` | integer | No | - | Number of zones per page. Only used when `pageNumber` is specified. Default: `10`. |
## Response Fields
| `response.pageNumber` | integer | Current page number (only when paginated). |
| `response.totalPages` | integer | Total number of pages (only when paginated). |
| `response.totalZones` | integer | Total number of zones (only when paginated). |
| `response.zones` | array | Array of zone objects. |
| `response.zones[].name` | string | Zone domain name. Empty string for root zone. |
| `response.zones[].type` | string | Zone type (e.g., `Primary`, `Secondary`, `Stub`, `Forwarder`). |
| `response.zones[].internal` | boolean | Whether the zone is internal. Present for Primary zones. |
| `response.zones[].dnssecStatus` | string | DNSSEC signing status (e.g., `Unsigned`, `SignedWithNSEC`). |
| `response.zones[].soaSerial` | integer | SOA serial number. |
| `response.zones[].expiry` | string | Zone expiry timestamp (ISO 8601). Present for Secondary zones. |
| `response.zones[].isExpired` | boolean | Whether the zone has expired. Present for Secondary zones. |
| `response.zones[].syncFailed` | boolean | Whether zone sync has failed. Present for Secondary zones. |
| `response.zones[].notifyFailed` | boolean | Whether notify has failed. Present for non-internal Primary zones. |
| `response.zones[].notifyFailedFor` | array | List of IPs for which notify failed. Present for non-internal Primary zones. |
| `response.zones[].lastModified` | string | Last modified timestamp (ISO 8601). |
| `response.zones[].disabled` | boolean | Whether the zone is disabled. |
## Conditional Logic Notes
- When `pageNumber` is not specified, **all** zones are returned (no pagination).
- `zonesPerPage` is only honored when `pageNumber` is specified.
- Response fields vary by zone type: Secondary zones include `expiry`, `isExpired`, `syncFailed`; non-internal Primary zones include `notifyFailed`, `notifyFailedFor`.
- Only zones the user has View permission for are returned.
## Edge Cases
- The root zone is represented by an empty string for the `name` field.
- Internal zones (e.g., `localhost`, `0.in-addr.arpa`) have `internal: true`.
- Requires both Zones-level View permission AND individual Zone View permission.
## Obsolete Paths
- `/api/zone/list`
- `/api/listZones`