文档中心 API文档 删除证书V2

删除证书V2

更新时间:2023-06-27 11:43:24

适用产品

证书管理

接口描述

删除SSL证书,如果查询证书还有关联域名在使用,则无法删除,需要使用【修改域名配置】接口解除域名与证书的关联。

推荐使用 Open API在线调试

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

请求参数

Path 参数

参数名称描述
*certificateIdInteger
需要删除的证书id

返回参数

Body 参数

参数名称描述
codeInteger
接口响应code,0代表成功。
messageString
接口响应信息,success代表成功,失败则提供失败信息。
dataList
接口响应数据

错误码

错误代码(code)描述(message)HTTP状态码语义
0success200调用接口成功
26938005PARAM_INVALID400证书id不存在
26939999InternalError500内部异常
19610038The customerCode does not exist.400根据客户名称取客户,客户不存在
36540000The certificateId you provided is empty.400证书不存在
36540000The certificateId you provided is invalid. certificateId=400certificateId不是数值型
36540000The certificate is not found or deleted.400证书被标记删除
36540134The certificate is not belong to this given customer.400证书不属于该客户
36540160The SSL certificate is in deleting and cannot be deleted again.400证书正在删除中(锁判断)
36540000The certificate is not found or deleted.400证书状态为已删除
36540160The SSL certificate is in deleting and cannot be deleted again.400证书状态为删除中
36540161The SSL certificate is in deploying and cannot be deleted.400证书正在部署中
36540160The SSL certificate is in deleting and cannot be deleted again.400证书所在应用服务组删除中
36540085The SSL certificate is in use for certificate template and cannot be deleted.400证书存在证书配置模板关联
36540085The SSL certificate is in use for domain config and cannot be deleted.400证书存在域名关联

示例

JSON示例
XML示例
JSON示例
请求示例
复制代码 复制成功
#!/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/api/certificate/{certificateId}" \
-X "DELETE" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json"
返回示例
复制代码 复制成功
HTTP/1.1 200 OK
Date: Sun, 05 May 2019 09:08:53 GMT
Content-Type: application/json;charset=utf-8
x-cnc-request-id: 83bbebc7-2c95-47d7
{"code":"0",
"message":"success",
"data":""
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!