Help Center
Login Sign up
  1. Home
  2. API reference
  3. API documentation (JSON/XML)
  4. Tasks
  5. Zone tasks

Zone import

API reference (XML/JSON) · Updated 2023-09-19

Function

The ZoneImport task imports zones to name servers managed by the system.

The ZoneImport task can be used for external and internal zone import. For internal import the key sourceVirtualHostname (for Json) and source_system_ns (for XML) must be used, for external import the key source.

Description

Route: POST /zone/{name}/{systemNameServer}/_import

Example for an internal import

{  
  "origin": "example.com",
  "soa": {     
    "refresh": 3600,
    "retry": 7200,
    "expire": 604800,
    "ttl": 600,
    "email": "customer@example.com"
  },
  "dnssec": true,
  "allowTransfer": true,
  "sourceVirtualHostname": "myexample.de",
  "nameServers": [
    {
      "name": "ns1.example.com",
      "ttl": 600,
      "ipAddresses": [
        "1.2.3.4"
      ]
    },
    {
      "name": "ns2.example.com",
      "ttl": 600,
      "ipAddresses": [
        "4.3.2.1"
      ]
    }
  ],  
  "main": {
    "address": "7.7.7.7",
    "ttl": 86000
  },
  "wwwInclude": true,
  "action": "PRIMARY",
  "resourceRecords": [
    {
      "name": "subdomainexample",
      "ttl": 600,
      "type": "A",
      "value": "1.3.5.7"
    }
  ]
}
{
   "stid": "20190701-app-11942",
   "status": {
      "code": "S0204",
      "text": "Zone import has been completed successfully.",
      "type": "SUCCESS"
   },
   "object": {
      "type": "Zone",
      "value": "example.com"
   }
}

Example for an external import

{  
  "origin": "example.com",
  "soa": {     
    "refresh": 3600,
    "retry": 7200,
    "expire": 604800,
    "ttl": 600,
    "email": "customer@example.com"
  },
  "dnssec": true,
  "allowTransfer": true,
  "source": "9.8.7.6",
  "nameServers": [
    {
      "name": "ns1.example.com",
      "ttl": 600,
      "ipAddresses": [
        "1.2.3.4"
      ]
    },
    {
      "name": "ns2.example.com",
      "ttl": 600,
      "ipAddresses": [
        "4.3.2.1"
      ]
    }
  ],  
  "main": {
    "address": "7.7.7.7",
    "ttl": 86000
  },
  "wwwInclude": true,
  "action": "PRIMARY",
  "resourceRecords": [
    {
      "name": "subdomainexample",
      "ttl": 600,
      "type": "A",
      "value": "1.3.5.7"
    }
  ]
}
{
   "stid": "20190701-app-12345",
   "status": {
      "code": "S0204",
      "text": "Zone import has been completed successfully.",
      "type": "SUCCESS"
   },
   "object": {
      "type": "Zone",
      "value": "example.com"
   }
}