CreateZone always returns an empty response. The struct should be nested with the "zone" key.
// Create zone
r, err := cs.Zone.CreateZone(p)
Example response from API
{
"zone": {
"id": "6a36f514-e6ea-4a16-85ff-747b063a156e",
"name": "test",
"dns1": "xx.xx.xx.xx",
"dns2": "xx.xx.xx.xx",
"ip6dns1": "",
"ip6dns2": "",
"internaldns1": "1xx.xx.xx.xx",
"internaldns2": "xx.xx.xx.xx",
"domain": "foo.example.com",
"networktype": "Advanced",
"securitygroupsenabled": false,
"allocationstate": "Disabled",
"zonetoken": "d9609197-6586-3fe3-8c4f-efa15a375e8f",
"dhcpprovider": "VirtualRouter",
"localstorageenabled": false,
"tags": [],
"hasannotations": false
}
}
CreateZone always returns an empty response. The struct should be nested with the "zone" key.
Example response from API
{ "zone": { "id": "6a36f514-e6ea-4a16-85ff-747b063a156e", "name": "test", "dns1": "xx.xx.xx.xx", "dns2": "xx.xx.xx.xx", "ip6dns1": "", "ip6dns2": "", "internaldns1": "1xx.xx.xx.xx", "internaldns2": "xx.xx.xx.xx", "domain": "foo.example.com", "networktype": "Advanced", "securitygroupsenabled": false, "allocationstate": "Disabled", "zonetoken": "d9609197-6586-3fe3-8c4f-efa15a375e8f", "dhcpprovider": "VirtualRouter", "localstorageenabled": false, "tags": [], "hasannotations": false } }