删除证书

更新时间:2023-04-04 20:53:48

适用产品

CDN Pro

接口描述

该接口用来删除证书。当证书在生产环境或演练环境中使用时不可删除。

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Path 参数

参数名称描述
*certificateIdString
证书 id。

错误码

错误代码(code)描述(message)HTTP状态码语义
InvalidCertIdThe specified certificate ID does not exist.404指定的证书ID不存在。
CertificateInUseThe certificate cannot be deleted because it is in use on production or staging.409证书在演练环境或生产环境中使用,不可删除。

示例

404
409
404
请求示例
复制代码 复制成功
#!/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."
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!