codecamp

OpenAI 列出组织证书

列出组织证书

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
}
OpenAI 删除证书
OpenAI 为组织激活证书
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

其他能力与进阶指南

Embeddings 接口参考

审计日志接口参考

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }