Deleting Acceleration Domain Name

Last updated: 2018-01-19 15:58:34

1. API Description

This API (DeleteCdnHost) is used to delete the specified CDN domain.

Domain for API

1) Only one domain can be deleted at a time;
2) Only domains in Closed status can be deleted.

Call Demo

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is DeleteCdnHost.

Parameter Name Required Type Description
hostId Yes Int The domain ID to be deleted


3. Output Parameters

Parameter Name Type Description
code Int Common error code; 0: Succeeded; other values: Failed. For more information, refer to Common Error Codes on Error Code page.
message String Module error message description depending on API.
codeDesc String English error message or error code at business side.

4. Example

4.1 Input Example

hostId: 1234

4.2 GET Request

For GET request, all the parameters are required to be appended to the URL:

4.3 POST Request

For POST request, the parameters need to be filled in HTTP Request-body. Request address:

Formats such as form-data and x-www-form-urlencoded are supported for the parameters. The array of parameters is as follows:

array (
  'Action' => 'DeleteCdnHost',
  'Timestamp' => 1462782282,
  'Nonce' => 123456789,
  'hostId' => 1234,

4.4 Example of Returned Result

Deleted successfully

    "retcode": 0,
    "errmsg": "ok",
    "code": 0,
    "message": "",
    "codeDesc": "Success",
    "data": []

Deletion failed

    "code": 4000,
    "message": "(22200) Dnspod API exception cdn dp system error[cdn dp system error[connect () timed out!]]",
    "codeDesc": 22200