Zone Actions
Import a Zone file
Imports a zone file, replacing all resource record sets (RRSets).
The import will fail if existing RRSet are change protected.
See Zone file import for more details. Only applicable for Zones in primary mode.
Operation specific errors
| Status | Code | Description |
|---|---|---|
| 422 | incorrect_zone_mode | This operation is not supported for this Zone's mode. |
post/zones/{id_or_name}/actions/import_zonefile
Request
- Base URL: https://api.hetzner.cloud/v1
- URL: https://api.hetzner.cloud/v1/zones/{id_or_name}/actions/import_zonefile
- Auth: HTTP bearer
Path parameters
id_or_namestring required
ID or Name of the Zone.
ID or Name of the Zone.
Request body
Example request
{
"zonefile": "$ORIGIN\texample.com.\n$TTL\t3600\n\n@\tIN\tSOA\thydrogen.ns.hetzner.com. dns.hetzner.com. 2024010100 86400 10800 3600000 3600\n\n@\tIN\t10800\tNS\thydrogen.ns.hetzner.com. ; Some comment.\n@\tIN\t10800\tNS\toxygen.ns.hetzner.com.\n@\tIN\t10800\tNS\thelium.ns.hetzner.de.\n"
}Response
Request succeeded.
Example response
{
"action": {
"id": 42,
"command": "start_resource",
"started": "2016-01-30T23:55:00Z",
"finished": "2016-01-30T23:55:00Z",
"progress": 100,
"resources": [
{
"id": 42,
"type": "server"
}
],
"error": {
"code": "action_failed",
"message": "Action failed"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.