---
title: "Return a parsed DNS zone"
method: GET
path: "/parse_dns_zone"
tags: ["DNS", "DNS Zones"]
---

# Return a parsed DNS zone

`GET /parse_dns_zone`

This function parses a given DNS zone.

**Important:**

Most DNS zones contain only 7-bit ASCII. However, it is possible for
DNS zones to contain any binary sequence. An application that decodes
this function's base64 output **must** be able to handle cases
where the decoded octets do not match any specific character
encoding.

## Query parameters

- `zone` string, required

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `payload` union[] — The zone’s content.
      - union
        - ResponseRR
          - `line_index` integer — The line’s index in the zone file.
          - `type` 'record' | 'control' | 'comment' — The type of object in the zone file: * `record` - A resource record. * `control` - A control statement. * `comment` - A line comment.
          - `data_b64` string[] — The resource record’s content, encoded to base64.
          - `dname_b64` string, base64 — The resource record’s owner, encoded to base64. A base64-decoded owner that lacks a trailing period (`.`) is a subdomain of the zone.
          - `record_type` string — The resource record’s type.
          - `ttl` integer — The resource record’s TTL (Time-to-Live).
        - ResponseControl
          - `line_index` integer — The line’s index in the zone file.
          - `type` 'record' | 'control' | 'comment' — The type of object in the zone file: * `record` - A resource record. * `control` - A control statement. * `comment` - A line comment.
          - `text_b64` string, base64 — The line’s text, encoded to base64.
        - ResponseComment
          - `line_index` integer — The line’s index in the zone file.
          - `type` 'record' | 'control' | 'comment' — The type of object in the zone file: * `record` - A resource record. * `control` - A control statement. * `comment` - A line comment.
          - `text_b64` string, base64 — The line’s text, encoded to base64.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` - Success. * `0` - Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
