更新时间:2023-11-30 GMT+08:00

获取SSL证书列表

功能介绍

获取SSL证书列表。

调用方法

请参见如何调用API

URI

GET /v2/{project_id}/apigw/certificates

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方式请参见获取项目ID

表2 Query参数

参数

是否必选

参数类型

描述

offset

Long

偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0

缺省值:0

limit

Integer

每页显示的条目数量,条目数量小于等于0时,自动转换为20,条目数量大于500时,自动转换为500

最小值:1

最大值:500

缺省值:20

name

String

证书名称

common_name

String

证书域名

signature_algorithm

String

证书签名算法

type

String

证书可见范围

枚举值:

  • instance

  • global

instance_id

String

证书所属实例ID

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

size

Integer

本次返回的列表长度

total

Long

满足条件的记录数

certs

Array of CertBase objects

证书基本内容

表5 CertBase

参数

参数类型

描述

id

String

证书ID

name

String

证书名称

type

String

证书类型

  • global:全局证书

  • instance:实例证书

枚举值:

  • global

  • instance

instance_id

String

实例编码

  • typeglobal时,缺省为common

  • typeinstance时,为实例编码

project_id

String

租户项目编号

common_name

String

域名

san

Array of strings

san扩展域名

not_after

String

有效期到

signature_algorithm

String

签名算法

create_time

String

创建时间

update_time

String

更新时间

is_has_trusted_root_ca

Boolean

是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。

缺省值:false

状态码: 400

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 401

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 403

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 500

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

响应示例

状态码: 200

OK

{
  "total" : 1,
  "size" : 1,
  "certs" : [ {
    "id" : "a27be832f2e9441c8127fe48e3b5ac67",
    "name" : "cert_demo",
    "type" : "instance",
    "project_id" : "73d69ae0cfcf460190522d06b60f05ad",
    "instance_id" : "f0fa1789-3b76-433b-a787-9892951c620e",
    "common_name" : "apigtest.example.com",
    "san" : [ "apigtest.example.com", "*.san.com" ],
    "not_after" : "2021-04-26T09:03:30Z",
    "signature_algorithm" : "SHA256-RSA",
    "create_time" : "2021-08-26T07:27:06.304004Z",
    "update_time" : "2021-08-26T07:27:06.304004Z"
  } ]
}

状态码: 400

Bad Request

{
  "error_code" : "APIG.2012",
  "error_msg" : "Invalid parameter value,parameterName:dict_name. Please refer to the support documentation"
}

状态码: 401

Unauthorized

{
  "error_code" : "APIG.1002",
  "error_msg" : "Incorrect token or token resolution failed"
}

状态码: 403

Forbidden

{
  "error_code" : "APIG.1005",
  "error_msg" : "No permissions to request this method"
}

状态码: 500

Internal Server Error

{
  "error_code" : "APIG.9999",
  "error_msg" : "System error"
}

状态码

状态码

描述

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

错误码

请参见错误码