Deactive DSA Domain Name

Last updated: 2018-08-13 10:10:13

PDF

API Description

This API (OfflineDsaHost) is used to disable DSA service for the specified accelerated domain names.
Domain name for API request: dsa.api.qcloud.com

1) You can only disable DSA for one domain name at a time with this API;
2) After DSA is disabled for a domain name, the Cname domain name resolution is switched back to the origin server, and 404 is returned for all the access requests from HOST to CDN nodes;
3) A maximum of 100 calls to this API are allowed per minute. If the limit is exceeded, an error is returned.

Input Parameters

The following request parameter list only provides 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 OfflineDsaHost.

Parameter Name Required Type Description
hostId Yes Unsigned The ID of the domain name after it is connected to DSA. You can obtain the ID through the API Query Domain Name List

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.

Example

1. Configuration example

Disable DSA service for the domain name dsa.qcloud.com:

host: dsa.qcloud.com
hostId: 1234

2. GET request

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

https://dsa.api.qcloud.com/v2/index.php?
Action=OfflineDsaHost   
&SecretId=XXXXXXXXXXXXXXXXXXXXXXXXX   
&Timestamp=1462440051   
&Nonce=123456789   
&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXX  
&hostId=1234

3. POST request

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

https://dsa.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' => 'OfflineDsaHost',
  'SecretId' => 'SecretId',
  'Timestamp' => 1462782282,
  'Nonce' => 123456789,
  'Signature' => 'Signature',
  'hostId' => 1234
)

4 Example of returned result

Disabled successfully

{
    "code": 0,
    "message": "",
    "codeDesc": "Success"
}

Failed to Disable

{
    "code": 4000,
    "message": "Request failed. Parameter [hostId] cannot be empty.",
    "codeDesc": "InvalidParameter"
}