# 云证书延期
云证书延期
# 一、请求说明
- 请求地址:http://IP:PORT/openapi/kms/v1/cloud-cert/postpone
- 服务接口名称(即公共参数method的值): cloud-cert/postpone
- 请求方式:POST
# 二、请求参数
| 名称 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| certId | String | 是 | 证书id |
| signCert | String | 是 | 签名证书(BASE64) |
| encCert | String | 是 | 加密证书(BASE64) |
# 三、响应参数
| data 结果信息 | 类型 | 描述 |
|---|---|---|
| result | Integer | 延期结果(0为成功) |
# 四、成功示例
JSON示例
{
"code":0,
"message":"success",
"requestId":"xxx"
}
# 五、失败示例
JSON示例
{
"code": 10201
"message": "证书内容不合法",
"requestId":"xxx",
}
# 六、SDK请求示例
public static void main(String[] args) {
// 提供的URL
String url = "http://localhost:9200";
// 您的appKey
String appKey = "xxx";
// 您的appSecret
String appSecret = "xxx";
// 1.原客户端
PkiClient pkiClient = new PkiOkhttpClient(url, appKey, appSecret);
CertPostponeRequest request = new CertPostponeRequest();
//证书id
request.setCertId("xxx");
request.setSignCert("xxx");
request.setEncCert("xxx");
try {
CertPostponeResponse response = pkiClient.execute(request);
// 后续业务
if (response.isSuccess()) {
System.out.println("成功响应:" + response.getResult());
} else {
System.out.println("失败响应:" + response.getBody());
}
} catch (ApiException e) {
e.printStackTrace();
}
}