cPanel Availability Zone

/cpanel-availability-zone

An availability zone is a concept used to give customers the possibility to provision their hosts across different physical regions or locations to ensure high availability. Spreading hosts over multiple zones lowers the risk of down-time.

GET

Returns a list of availability zones.

Request parameters

N/A

Possible errors

N/A

JSON response

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cpanel-availability-zone" | python -m json.tool

POST

Create a cPanel availability zone.

Request parameters

name string (Optional) The name of the availability zone
provisioner uuid (Optional) The id of the provisioner for which the zone should be created

Possible errors

JSON response

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "name": "zone-01",
        "provisioner": "76ede992-1dd2-4c43-a5d5-7a051dfd8306"
    }
' \
"{{api_base_url}}/cpanel-availability-zone" | python -m json.tool

/cpanel-availability-zone/{id}

GET

Get information for the specified availability zone.

Request parameters

N/A

JSON response

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cpanel-availability-zone/{id}" | python -m json.tool

PUT

Update a specific availability zone.

Request parameters

name string (Optional) The name of the availability zone

Possible errors

JSON response

Sample

curl \
--request PUT \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "name": "zone-02"
    }
' \
"{{api_base_url}}/cpanel-availability-zone/{id}" | python -m json.tool

DELETE

Delete an availability zone.

Request parameters

N/A

JSON response

N/A

Possible errors

Sample

curl \
--request DELETE \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cpanel-availability-zone/{id}" | python -m json.tool