Bỏ qua tới nội dung

Chờ lệnhoperation_wait

Wait for an operation

Chỉ đọcHồ sơ: Lõi (luôn có)Quyền: Lệnh · đọc

Wait up to 25 seconds (default 15) until a command finishes or changes state, then return its status. Call again while it is still queued or waiting. Never resend a message whose operation ended `unverified`.

Không thay đổi gì.

REST

GET
/api/public/v2/operations/{operationId}/wait

MCP

operation_wait

Cùng tên trên cổng đăng nhập /mcp và cổng khoá /api/public/mcp.

Tham số

TênỞ đâuKiểuBắt buộcMô tả
operationIdđường dẫnuuidBắt buộc—
timeoutSecondsqueryintegerKhôngMặc định 15. Từ 1 tới 25.

Không gửi workspaceId: luôn lấy từ khoá hoặc kết nối AI.

curl -X GET "https://<ten-mien-cua-ban>/api/public/v2/operations/3f2c1e9b-6a4d-4c0f-b2e8-3d7a9f1c2e44/wait" \
  -H "Authorization: Bearer $WA_AUTO_KEY"

Phản hồi (200)

{
  "…": "dữ liệu của thao tác"
}

Lỗi có thể gặp

HTTPcodeÝ nghĩa
401unauthorizedThiếu khoá/đăng nhập, hoặc khoá không đúng.
403permission_deniedKhoá/kết nối không có quyền này, hoặc vai trò của người tạo không đủ.
404not_foundKhông có đối tượng này, hoặc bạn không được xem nó.
422validation_failedDữ liệu gửi lên sai kiểu hoặc thiếu trường — xem `violations`.
429rate_limitedQuá 60 yêu cầu/phút cho một khoá hoặc kết nối — đợi theo Retry-After.
503pausedAPI/MCP đang tạm dừng (nút ngắt khẩn của workspace hoặc đội vận hành).

Lỗi theo RFC 9457 (application/problem+json). Xem mọi mã lỗi.

# MCP (JSON-RPC) — tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "operation_wait",
    "arguments": {
      "operationId": "3f2c1e9b-6a4d-4c0f-b2e8-3d7a9f1c2e44"
    }
  }
}