Skip to content

GET /api/v1/certificates

GET/api/v1/certificates

我的证书库列表

useroperationId: certificateList

请求示例

cURL
curl -X GET 'http://localhost:8080/api/v1/certificates' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <JWT>'
JavaScript
const res = await fetch('http://localhost:8080/api/v1/certificates', {
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <JWT>'
  },
});
const data = await res.json();
Python
import requests

res = requests.get(
    'http://localhost:8080/api/v1/certificates',
    headers={'Accept': 'application/json', 'Authorization': 'Bearer <JWT>'}
)
print(res.json())

响应

200成功

application/json

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "owner_user_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "not_before": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "not_after": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "bound_domain": {
            "type": "string"
          },
          "owner_email": {
            "type": "string"
          },
          "covered_names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expired": {
            "type": "boolean"
          },
          "days_left": {
            "type": "integer"
          }
        }
      }
    }
  }
}
401未认证或凭据无效

application/json

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "not_found"
    },
    "message": {
      "type": "string",
      "example": "资源不存在"
    }
  }
}

在线调试

在线调试
凭证仅保存在当前页面内存中
自定义请求 Header