執行環境POST
啟動執行環境
啟動嗰個帳號嘅執行實例。呢個係執行環境控制,同認證無關。
https://api.unifyport.ai/v1/accounts/{account_id}/runtime/start請求標頭
X-Api-Keystring必填
工作區 API Key,工作區會由呢個標頭解析得出嚟。
Content-Typestring必填
發送 JSON 請求內容嘅時候請用 application/json。
路徑參數
account_idstring必填
用嚟識別嗰條 runtime 路由嘅 ID。
請求內容
呢個介面接收空 JSON 物件;請跟請求例子傳送 {}。
回應內容
account_idstring
呢個回應所指嘅渠道帳號。
providerstring
處理呢次運行操作嘅渠道。
enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol
actionstring
今次要求嘅運行操作。
enum: refresh_status, start, stop, reconnect
operation_statusstring
運行操作已受理或者完成嘅狀態。
runtime_statusstring
標準化嘅運行狀態,係 unknown、starting、running、stopping、stopped、reconnecting、disconnected 或者 error 其中一個。
enum: unknown, starting, running, stopping, stopped, reconnecting, disconnected, error
runtime_errorstring
操作未完成時嘅渠道運行錯誤。
回應
200200 OK
請求成功,回應內容嘅例子如上。
400請求錯誤
請求內容、路徑或者參數無效。
401未授權
X-Api-Key 請求標頭缺少或者無效。
409衝突
目前操作同現有嘅渠道帳號或者資源衝突。
500伺服器錯誤
服務遇到咗未預期嘅錯誤。
502上游閘道錯誤
渠道轉接器或者上游渠道未能完成呢個操作。
請求
curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/runtime/start \
-H "X-Api-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{}'回應
{
"data": {
"runtime_status": "starting"
}
}