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

# Return a parsed DNS zone

`GET /DNS/parse_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
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` 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.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
      - `transformed` 1 — Post-processing may have transformed the data.
    - `status` 0 | 1 — * `1` — Success. * `0` — Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

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