OpenAI 列出组织证书

2026-11-13 11:36 更新

列出组织证书

get /organization/certificates

列出已上传到此组织的证书。

查询参数

  • after: optional string

分页游标。after 是标记当前列表位置的对象 ID。例如,列表请求返回了100个对象,最后一个为 obj_foo;后续调用可传入 after=obj_foo,以获取下一页。

  • limit: optional integer (default: 20)

返回的对象数量上限。取值范围为1至100,默认值为20。

  • order: optional "asc" or "desc" (default: "desc")

按对象的 created_at 时间戳排序。asc 表示升序,desc 表示降序。

  • "asc"

  • "desc"

返回值

  • data: array of object { id, active, certificate_details, 3 more }

  • id: string

标识符,可在 API 端点中引用。

  • active: boolean

证书当前是否在组织级别处于激活状态。

  • certificate_details: object { expires_at, valid_at }

  • expires_at: optional integer

证书过期时间的 Unix 时间戳,单位为秒。

format: unixtime

  • valid_at: optional integer

证书开始有效的时间,以 Unix 时间戳表示,单位为秒。

format: unixtime

  • created_at: integer

证书上传时间的 Unix 时间戳,单位为秒。

format: unixtime

  • name: string or null

证书名称。

  • object: "organization.certificate"

对象类型,固定为 organization.certificate。

  • "organization.certificate"

  • first_id: string or null

  • has_more: boolean

  • last_id: string or null

  • object: "list"

  • "list"

示例

## 使用环境变量中的管理员密钥;证书ID和PEM占位内容需换成实际值
curl https://api.openai.com/v1/organization/certificates \
    -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

200 — 示例

以下为字段结构示例;字段名、证书ID和协议固定值按原文保留。

{
  "data": [
    {
      "id": "id",
      "active": true,
      "certificate_details": {
        "expires_at": 0,
        "valid_at": 0
      },
      "created_at": 0,
      "name": "示例证书名称",
      "object": "organization.certificate"
    }
  ],
  "first_id": "cert_abc",
  "has_more": true,
  "last_id": "cert_abc",
  "object": "list"
}

示例

## 使用环境变量中的管理员密钥;证书ID和PEM占位内容需换成实际值
curl https://api.openai.com/v1/organization/certificates \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY"

响应示例

以下为对应请求的响应示例。时间值和证书内容仅作结构展示。

{
  "object": "list",
  "data": [
    {
      "object": "organization.certificate",
      "id": "cert_abc",
      "name": "我的示例证书",
      "active": true,
      "created_at": 1234567,
      "certificate_details": {
        "valid_at": 12345667,
        "expires_at": 12345678
      }
    }
  ],
  "first_id": "cert_abc",
  "last_id": "cert_abc",
  "has_more": false
}
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号