Deleting Acceleration Domain Name

Last updated: 2019-11-29 17:26:01

PDF

API Description

DeleteCdnHost is used to delete the specified accelerated domain name.

Domain name for API request: cdn.api.qcloud.com

Notes:

  • Only one domain name can be deleted at a time.
  • You can only delete a "Closed" domain name.
  • The frequency of calling the API is limited to 100 times/min.

Input Parameters

The following request parameter list only provides the API request parameters. Common request parameters are required when the API is called. For more information, please see Common Request Parameters page. The Action field for this API is DeleteCdnHost.

Parameter Name Required Type Description
hostId No Int domain ID to be deleted
host No String Accelerated domain name to be deleted

Notes

Output Parameters

Parameter Name Type Description
code Int Common error code. 0: Successful; other values: Failed.
For more information, please see Common Error Codes on the Error Codes page.
message String Module error message description depending on API.
codeDesc String Error message or error code at business side.
For more information, please see Business Error Codes on the Error Codes page.

Example

Sample Parameters

hostId: 1234

GET Request

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

https://cdn.api.qcloud.com/v2/index.php?
Action=DeleteCdnHost
&SecretId=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
&Timestamp=1462436277
&Nonce=123456789
&Signature=XXXXXXXXXXXXXXXXXXXXX
&hostId=1234

POST Request

For a POST request, the parameters are input in HTTP Request-body. The request address is:

https://cdn.api.qcloud.com/v2/index.php

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',
  'SecretId' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  'Timestamp' => 1462782282,
  'Nonce' => 123456789,
  'Signature' => 'XXXXXXXXXXXXXXXXXXXXXXXX=',
  'hostId' => 1234,
)

Example of Result

{
    "retcode": 0,
    "errmsg": "ok",
    "code": 0,
    "message": "",
    "codeDesc": "Success",
    "data": []
}
{
    "code": 4000,
    "message": "(22200) Dnspod API exception cdn dp system error[cdn dp system error[connect () timed out!]]",
    "codeDesc": 22200
}