Enable an accelerated domain with a state of "disabled" and provide accelerated service with an existing configuration.
パラメータ名 | 説明 |
---|---|
*domainIdInteger | Accelerate the ID of the domain name in the system
Note:
1. See the url in the request example, 123344 for domain-id
2. After the domain name is successfully submitted, the location access url in the return parameter can be queried to the domain-id of the domain name; You can also query domain-id through the Get domain Configuration and Get domain List interfaces |
パラメータ名 | 説明 |
---|---|
code | Error code, which appears when HTTPStatus is not 202, represents the error type of the current request call |
message | Response information, success when successful |
http status code | httpstatus=202; Indicates that the new domain API was successfully invoked, and the current deployment of the new domain can be viewed using x-cnc-request-id in the header |
x-cnc-request-id | Uniquely identified id for querying tasks per request (for all API) |
エラーコード(code) | 説明(message) | HTTPステータスコード | 意味 |
---|---|---|---|
NoSuchDomain | The specified domain does not exist. | 400 | The specified domain name does not exist. |
Forbidden | The domain is being deleted | 403 | Domain name has been deleted |
DomainNotDisabled | The domain you are trying to enable has not been disabled. | 409 | The domain name is enabled and cannot be enabled again. |
DomainCanNotEnable | Domain cannot enable. | 409 | Domain name cannot be enabled |
WRONG_OPERATOR | Operator [$operator] can not deal with domain name [$domainName]. | 400 | The author cannot operate the domain name |
NULL_DOMAIN_NAME | No domain. | 400 | No domain name |
PARAM_INVALID | param: {0} is null or invalid. | 400 | Parameter {0} null or illegal |
CustomerNoOwnDomain | customer not own domain name[{0}] | 400 | customer not own domain name[{0}] |
InvalidParameter | No domain was specified. | 400 | No domain was specified. |
DOMAIN_EXCEEDS_ENABLE_VALIDITY_PERIOD | The domain has been disabled for a long time(more than 3 months), and the historical configuration may not work. To avoid the risk, please delete the domain first, then recreate a new one. Domain Names:{0} | 400 | The domain has been disabled for a long time, and the historical configuration may not work. To avoid the risk, please delete the domain first, then recreate a new one. Domain Names:{0} |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://api.cdnetworks.com/api/domain/123344/enable" \ -X "PUT" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
HTTP/1.1 202 Accepted Date: Fri, 17 May 2017 06:33:26 GMT Content-Type: application/json;charset=utf-8 x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd {"message":"success"}