工作區GET
取得目前工作區
回傳與 X-Api-Key 請求標頭關聯的工作區。請求內容中無需再傳 workspace_id。
https://api.unifyport.ai/v1/workspace請求標頭
X-Api-Keystring必填
工作區 API Key,工作區會由此標頭解析得到。
路徑參數
此介面沒有路徑參數。
請求內容
此介面無需 JSON 請求內容。
回應內容
namestring
工作區顯示名稱。
statusstring
工作區生命週期狀態,例如 active。
metadataobject
儲存於工作區、面向自有環境的標籤。
account_quotanumber
此工作區允許的渠道帳號數量上限。
account_quota_unlimitedboolean
為 true 時帳號配額無上限,account_quota 將被忽略。
回應
200200 OK
請求成功,回應內容範例如上。
400請求錯誤
請求內容、路徑或參數無效。
401未授權
X-Api-Key 請求標頭缺少或無效。
409衝突
目前操作與既有的渠道帳號或資源衝突。
500伺服器錯誤
服務遇到了未預期的錯誤。
請求
curl -X GET https://api.unifyport.ai/v1/workspace \
-H "X-Api-Key: <YOUR_API_KEY>"回應
{
"data": {
"name": "Production Workspace",
"status": "active",
"metadata": {
"env": "production"
},
"account_quota": 10,
"account_quota_unlimited": false
}
}