plesk Host

/plesk-host

GET

Returns a list of hosts.

Request parameters

N/A

JSON response

array: plesk Host

Possible errors

N/A

Sample

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

POST

Add a plesk host.

Request parameters

provisioner uuid The id of the provisioner of the host
server string The server of the plesk Host
api_version string (Optional) The api version of the plesk server
username string (Optional) The username of the host’s account
password string (Optional) The password of the host’s account
security_token string (Optional) A token that can be used to authenticate the requests to the host. Is the alternative to a username and password (only usable for WHM version 64 and higher)
is_enabled_for_provisioning bool (Optional. Default: false) Whether the host is enabled for account provisioning
is_accepting_resellers bool (Optional. Default: false) Whether the host is accepting resellers

Possible errors

JSON response

array: plesk Host

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "provisioner": "3a6ca5b2-ba2b-49df-aeb3-225adcc3e8df",
        "is_enabled_for_provisioning": "true",
        "is_accepting_resellers": "true",
        "server": "example-host.domain.com",
        "api_version": "1.6.7.0",
        "security_token": "cpsess##########",
        "username": "user",
        "password": "password"
    }
' \
"{{api_base_url}}/plesk-host" | python -m json.tool

/plesk-host/{id}

GET

Get detailed information for this host.

Request parameters

N/A

JSON response

array: plesk Host

Possible errors

Sample

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

PUT

Update a specific host.

Request parameters

is_enabled_for_provisioning bool (Optional) Whether the host is enabled for provisioning accounts
is_accepting_resellers bool (Optional) Whether the host is accepting resellers
server string (Optional) The server of the plesk Host
api_version string (Optional) The api version of the plesk server
security_token string (Optional) A token that can be used to authenticate the requests to the host (only usable for WHM version 64 or higher)
username string (Optional) The username of the host’s account
password string (Optional) The password of the host’s account

JSON response

array: plesk Host

Possible errors

Sample

curl \
--request PUT \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "is_enabled_for_provisioning": True,
        "is_accepting_resellers": True,
        "server": "example-host.domain.com",
        "security_token": "cpsess##########"
    }
' \
"{{api_base_url}}/plesk-host/{id}" | python -m json.tool