API 參考
工作區GET

取得目前工作區

回傳與 X-Api-Key 請求標頭關聯的工作區。請求內容中無需再傳 workspace_id。

https://api.unifyport.ai/v1/workspace

請求標頭

X-Api-Key
string必填

工作區 API Key,工作區會由此標頭解析得到。

路徑參數

此介面沒有路徑參數。

請求內容

此介面無需 JSON 請求內容。

回應內容

name
string

工作區顯示名稱。

status
string

工作區生命週期狀態,例如 active。

metadata
object

儲存於工作區、面向自有環境的標籤。

account_quota
number

此工作區允許的渠道帳號數量上限。

account_quota_unlimited
boolean

為 true 時帳號配額無上限,account_quota 將被忽略。

回應

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