codecamp

OpenAI 列出Webhook端点

列出 Webhook 端点

get /webhook_endpoints

返回当前身份验证所对应项目的 Webhook 端点,按从新到旧的顺序排列。

查询参数

  • after: optional string or null

上一页最后一个 Webhook 端点的 ID。

  • limit: optional integer

返回的 Webhook 端点数量上限。默认为20。

minimum: 1, maximum: 100

返回值

  • WebhookEndpointList object { data, first_id, has_more, 2 more }

  • data: array of WebhookEndpoint

当前页中的 Webhook 端点。

  • id: string

Webhook 端点的唯一 ID。

  • created_at: integer

端点创建时的 Unix 时间戳。

format: unixtime

  • event_types: array of string

触发向此端点投递的事件类型。

  • name: string

端点便于阅读的名称。

  • object: "webhook_endpoint" (default: "webhook_endpoint")

对象类型,始终为 webhook_endpoint。

  • "webhook_endpoint"

  • signing_secret_hint: string or null

端点签名密钥的掩码提示。

  • url: string

接收 Webhook 投递的 HTTPS URL。

  • updated_at: optional integer

上次更改端点配置或签名密钥时的 Unix 时间戳。创建时初始化;测试以及未改变配置的更新不会推进此时间戳。

format: unixtime

  • first_id: string or null

当前页第一个端点的 ID。

  • has_more: boolean

是否还有更多 Webhook 端点可供获取。

  • last_id: string or null

当前页最后一个端点的 ID。

  • object: "list" (default: "list")

对象类型,始终为 list。

  • "list"

示例

## 从环境变量读取 API 密钥;运行前替换 Webhook 端点 ID、URL 和名称占位值。
curl https://api.openai.com/v1/webhook_endpoints \
    -H "Authorization: Bearer $OPENAI_API_KEY"

200:示例

{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "event_types": [
        "string"
      ],
      "name": "示例端点",
      "object": "webhook_endpoint",
      "signing_secret_hint": "signing_secret_hint",
      "url": "url",
      "updated_at": 0
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
OpenAI 删除Webhook端点
OpenAI 轮换Webhook端点签名密钥
温馨提示
下载编程狮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; }