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

Zone update bulk

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

Function

The ZoneUpdateBulk task updates several zones, on name servers managed by the system, in one job.

Description

Route: PATCH /bulk/zone

Add and remove values from zone entries:

With the keyword resourceRecordsAdd you can change single zone entries of a subdomain, with the keyword resourceRecordsRem you can remove them.

Examples for adding data

In this example an A-record and an MX-record are added for the two zones bulk-1.test and bulk-2.test. For adding to multiple zones, multiple zone blocks can be inserted.

{
    "template": {
        "resourceRecordsAdd": [
            {
                "name": "sub1",
                "ttl": 600,
                "type": "A",
                "pref": 10,
                "value": "1.2.1.2"
			},
            {
                "name": "mail",
                "ttl": 600,
                "type": "MX",
                "pref": 10,
                "value": "1.2.1.2"
			}
		],
        "soa": {
            "refresh": 39940,
            "retry": 7200,
            "expire": 604800,
            "ttl": 86400,
            "email": "customer@example.com"
        }
    },

    "objects": [
        {
            "origin": "bulk-1.test",
            "virtualNameServer": "ns1.example.com"
		},
        {
            "origin": "bulk-2.test",
            "virtualNameServer": "ns1.example.com"
		}
	]
}
{
    "stid": "20201204-app1-dev-24993",
    "object": {
        "type": "Zone",
        "summary": 2
    },
    "data": [
        {
            "status": {
                "code": "S0202",
                "text": "Zone was updated successfully on the name server.",
                "type": "SUCCESS"
            },
            "object": {
                "type": "Zone",
                "value": "bulk-1.test",
                "data": {
                    "origin": "bulk-1.test",
                    "virtualNameServer": "ns1.example.com",
                    "roid": 164728
                }
            }
        },
        {
            "status": {
                "code": "S0202",
                "text": "Zone was updated successfully on the name server.",
                "type": "SUCCESS"
            },
            "object": {
                "type": "Zone",
                "value": "bulk-2.test",
                "data": {
                    "origin": "bulk-2.test",
                    "virtualNameServer": "ns1.example.com",
                    "roid": 164729
                }
            }
        }
    ]
}

Examples for searching and replacing values

This example searches for the TTL value, the " * " means "Search all and replace with the value 1000". No rr_add or rr_rem blocks are required for this.

{
	"modifiers": [
		{
			"type": "TTL",
			"search": "*",
			"replace": "1000"
		}
	],
    "objects": [
        {
            "origin": "bulk-1.test",
            "virtualNameServer": "ns1.example.com"
		},
        {
            "origin": "bulk-2.test",
            "virtualNameServer": "ns2.example.com"
		}
	]	
}
{
    "stid": "20201204-app1-dev-25276",
    "object": {
        "type": "Zone",
        "summary": 2
    },
    "data": [
        {
            "status": {
                "code": "S0202",
                "text": "Zone was updated successfully on the name server.",
                "type": "SUCCESS"
            },
            "object": {
                "type": "Zone",
                "value": "bulk-1.test",
                "data": {
                    "origin": "bulk-1.test",
                    "virtualNameServer": "ns1.example.com",
                    "roid": 164728
                }
            }
        },
        {
            "status": {
                "code": "S0202",
                "text": "Zone was updated successfully on the name server.",
                "type": "SUCCESS"
            },
            "object": {
                "type": "Zone",
                "value": "bulk-2.test",
                "data": {
                    "origin": "bulk-2.test",
                    "virtualNameServer": "ns1.example.com",
                    "roid": 164729
                }
            }
        }
    ]
}

Enter the authentication data for a BasicSSL certificate in the zone

{
    "template": {
        "resourceRecordsAdd": [
            {
                "name": "sa8ck1zhwhphl9y037wu4qnjs6m8mnbo.bulk.test.",
                "ttl": 600,
                "type": "CNAME",
                "value": "s20160419103010.bulk.test."
			}
		],

    },

    "objects": [
        {
            "origin": "bulk-1.test",
            "virtualNameServer": "ns1.dev-lab.intern.autodns-lab.com"
		}
	]
}
{
    "stid": "20201204-app1-dev-1590",
    "object": {
        "type": "Zone",
        "summary": 1
    },
    "data": [
        {
            "status": {
                "code": "S0202",
                "text": "Zone was updated successfully on the name server.",
                "type": "SUCCESS"
            },
            "object": {
                "type": "Zone",
                "value": "bulk-1.test",
                "data": {
                    "origin": "bulk-1.test",
                    "virtualNameServer": "ns1.example.com",
                    "roid": 164728
                }
            }
        }
    ]
}

Remove the authentication data of a BasicSSL certificate from the zone

{
    "template": {
        "resourceRecordsRem": [
            {
                "name": "sa8ck1zhwhphl9y037wu4qnjs6m8mnbo.bulk.test.",
                "ttl": 600,
                "type": "CNAME",
                "value": "s20160419103010.bulk.test."
			}
		],

    },

    "objects": [
        {
            "origin": "bulk-1.test",
            "virtualNameServer": "ns1.dev-lab.intern.autodns-lab.com"
		}
	]
}
{
    "stid": "20201204-app1-dev-1680",
    "object": {
        "type": "Zone",
        "summary": 1
    },
    "data": [
        {
            "status": {
                "code": "S0202",
                "text": "Zone was updated successfully on the name server.",
                "type": "SUCCESS"
            },
            "object": {
                "type": "Zone",
                "value": "bulk-1.test",
                "data": {
                    "origin": "bulk-1.test",
                    "virtualNameServer": "ns1.example.com",
                    "roid": 164728
                }
            }
        }
    ]
}

Possible Error Messages

  • EF02020 - No such zone exists.
  • EF02060 - For the selected zone entry type a preference (pref) cannot be set.
  • E0202 - Zone could not be updated on the name server.
  • EF02093 -Name server group could no be found.
  • EF02013 - Secondary name server is invalid.
  • E0242 - Subzone could not be updated.
  • EF02025 - We don't administrate any of the entered name servers.
  • E0202002 - Zone could not be updated on the name server.