Skip to main content
Run Steps

列出运行步骤

返回一个运行任务的所有步骤列表。

GET
/threads/{thread_id}/runs/{run_id}/steps
cURL
curl --request GET \
  --url 'https://dashscope.aliyuncs.com/api/v1/threads/{thread_id}/runs/{run_id}/steps' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "object": "list",
  "data": [
    {
      "id": "step_4db180b5-d44a-4b12-9390-4307c6cb87a5",
      "object": "thread.run.step",
      "created_at": 1711517599333,
      "assistant_id": "asst_46e95014-ccac-435d-b884-c97ac44a94d9",
      "thread_id": "thread_cc2a3e9d-436b-482b-91c5-377e0f376506",
      "run_id": "run_3de634fa-75d4-4370-adcf-92ba2a60c396",
      "type": "message_creation",
      "status": "completed",
      "step_details": {
        "type": "message_creation",
        "message_creation": {
          "message_id": "message_xxx"
        }
      },
      "last_error": null,
      "expired_at": null,
      "cancelled_at": null,
      "failed_at": null,
      "completed_at": 1711517600000,
      "metadata": {},
      "usage": {},
      "request_id": "ff3d2aea-555c-9825-80ca-24029a636641"
    }
  ],
  "first_id": "step_4db180b5-d44a-4b12-9390-4307c6cb87a5",
  "last_id": "step_4db180b5-d44a-4b12-9390-4307c6cb87a5",
  "has_more": false,
  "request_id": "ff3d2aea-555c-9825-80ca-24029a636641"
}

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。

Path Parameters

string
required

线程(Thread)的 ID。

string
required

需要列出步骤的运行(Run)的 ID。

Query Parameters

integer

要检索的运行步骤数量。默认为 None,表示使用服务器端默认值。

string

根据 created_at 字段排序,可设置为 asc(升序)或 desc(降序)。

string

用于分页,返回在此 ID 之后的运行步骤列表。与 before 互斥。

string

用于分页,返回在此 ID 之前的运行步骤列表。与 after 互斥。

Response

200-application/json
Managed Agent API
Flow Agent API
RAG API
Connector API
框架集成
  • 框架
Assistant API(下线中)