codecamp

OpenAI 删除自动化任务

delete /agents/automations/{automation_id}

删除自动化任务并阻止后续调用,目标会话保留。

路径参数

  • automation_id: string

minLength: 0, maxLength: 1048576

返回值

  • AutomationDeleted object { id, deleted, object }

  • id: string

已删除的自动化任务 ID。

minLength: 0

  • deleted: boolean

恒为 true。

  • object: "agent.automation.deleted" (default: "agent.automation.deleted")

固定为 agent.automation.deleted。

  • "agent.automation.deleted"

示例

## 从环境变量读取 API 密钥。
## 将 AUTOMATION_ID 设置为目标自动化任务的 ID。
curl https://api.openai.com/v1/agents/automations/$AUTOMATION_ID \
    -X DELETE \
    -H 'OpenAI-Beta: agents=v1' \
    -H "Authorization: Bearer $OPENAI_API_KEY"

200 响应示例

字段名、类型值和示例标识均按接口定义保留。

{
  "id": "id",
  "deleted": true,
  "object": "agent.automation.deleted"
}
OpenAI 更新自动化任务
OpenAI 列出自动化任务
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

其他能力与进阶指南

Embeddings 接口参考

审计日志接口参考

项目管理及子资源接口参考

Agents 接口及子资源

Decisions 接口参考

关闭

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; }