CDN Pro
该接口用来删除证书。当证书在生产环境或演练环境中使用时不可删除。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*certificateIdString | 证书 id。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidCertId | The specified certificate ID does not exist. | 404 | 指定的证书ID不存在。 |
CertificateInUse | The certificate cannot be deleted because it is in use on production or staging. | 409 | 证书在演练环境或生产环境中使用,不可删除。 |
#!/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://open.chinanetcenter.com/cdn/certificates/{certificateID}" \ -X "DELETE" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "code": "InvalidCertId", "message": "The specified certificate ID does not exist." }