Workspaces - List Workspaces

傳回工作區清單。
此 API 支援 分頁。 每個要求最多可以傳回 10,000 筆記錄。 透過回應中提供的接續令牌,您可以取得接下來的 10,000 筆記錄。

Permissions

呼叫端必須是網狀架構系統管理員,或使用服務主體進行驗證。

必要的委派範圍

Tenant.Read.All 或 Tenant.ReadWrite.All

Limitations

每小時最多 200 個要求。

encryptionStatus該濾波器僅在參數include包含 encryption時才會應用。

Microsoft Entra 支援的身份識別

此 API 支援本節中列出的Microsoft 身分識別。

Identity Support
User Yes
服務主體 和 受控識別 Yes

Interface

GET https://api.fabric.microsoft.com/v1/admin/workspaces
GET https://api.fabric.microsoft.com/v1/admin/workspaces?type={type}&capacityId={capacityId}&name={name}&state={state}&continuationToken={continuationToken}&encryptionStatus={encryptionStatus}&include={include}

URI 參數

名稱 位於 必要 類型 Description
capacityId
query

string (uuid)

工作區的容量標識碼。

continuationToken
query

string

接續令牌。 用來取得清單中的下一個專案。

encryptionStatus
query

string

顯示工作區的 CMK 加密狀態,並用於篩選符合指定狀態的工作區。

include
query

string

指定回應中每個工作區需包含的額外資料。 支援的值:encryption。

name
query

string

工作區名稱。

state
query

string

工作區狀態。 支援的狀態為作用中且已刪除。

type
query

string

工作區類型。 支持的類型為個人、工作區、adminworkspace。

回覆

名稱 類型 Description
200 OK

Workspaces

作業成功。

429 Too Many Requests

ErrorResponse

服務費率上限被超標。 伺服器會回傳一個 Retry-After 標頭,以秒數表示客戶端在發送額外請求前必須等待多久。

標題

Retry-After: integer

Other Status Codes

ErrorResponse

常見的錯誤碼:

  • BadRequest - 查詢參數,例如 workspaceType 或 workspaceState 無效。

  • InsufficientPrivileges - 呼叫端沒有呼叫 API 的許可權。

範例

Get a list of workspaces example
Get a list of workspaces using state query parameter example
List workspaces for a given capacity, ignoring the encryptionStatus filter.
List workspaces with active encryption status in a given capacity
List workspaces with encryption details

Get a list of workspaces example

範例要求

GET https://api.fabric.microsoft.com/v1/admin/workspaces

範例回覆

{
  "workspaces": [
    {
      "id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87",
      "name": "test report",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e84",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9",
      "tags": [
        {
          "id": "b3f2c8e9-4d8e-4a7c-9a32-f8c1b2e4d6af",
          "displayName": "Finance"
        },
        {
          "id": "6f1a8d3b-92c4-4f67-8c2d-1e5a9b7f4a23",
          "displayName": "Production"
        }
      ]
    }
  ],
  "continuationUri": "https://api.fabric.microsoft.com/v1/admin/workspaces?continuationToken='LDEsMTAwMDAwLDA%3D'",
  "continuationToken": "LDEsMTAwMDAwLDA%3D"
}

Get a list of workspaces using state query parameter example

範例要求

GET https://api.fabric.microsoft.com/v1/admin/workspaces?state=Active

範例回覆

{
  "workspaces": [
    {
      "id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87",
      "name": "test report",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e84"
    }
  ],
  "continuationUri": null,
  "continuationToken": null
}

List workspaces for a given capacity, ignoring the encryptionStatus filter.

範例要求

GET https://api.fabric.microsoft.com/v1/admin/workspaces?capacityId=61d6811f-7544-4e75-a1e6-1c59c0383312&encryptionStatus=Active

範例回覆

{
  "workspaces": [
    {
      "id": "abf49964-6f70-4aea-a66c-4b78a22e3ddc",
      "name": "Contoso Workspace 1",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "61d6811f-7544-4e75-a1e6-1c59c0383312",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9"
    },
    {
      "id": "90119767-07b4-4657-82ee-53e90fece225",
      "name": "Contoso Workspace 3",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "61d6811f-7544-4e75-a1e6-1c59c0383312",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9"
    }
  ],
  "continuationUri": "https://api.fabric.microsoft.com/v1/admin/workspaces?continuationToken='LDEsMTAwMDAwLDA%3D'",
  "continuationToken": "LDEsMTAwMDAwLDA%3D"
}

List workspaces with active encryption status in a given capacity

範例要求

GET https://api.fabric.microsoft.com/v1/admin/workspaces?capacityId=61d6811f-7544-4e75-a1e6-1c59c0383312&encryptionStatus=Active&include=encryption

範例回覆

{
  "workspaces": [
    {
      "id": "90119767-07b4-4657-82ee-53e90fece225",
      "name": "Contoso Workspace 3",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "61d6811f-7544-4e75-a1e6-1c59c0383312",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9",
      "encryption": {
        "status": "Active",
        "keyIdentifier": "https://westus07112025-cmktest1.vault.azure.net/keys/test2k/"
      }
    }
  ],
  "continuationUri": "https://api.fabric.microsoft.com/v1/admin/workspaces?continuationToken='LDEsMTAwMDAwLDA%3D'",
  "continuationToken": "LDEsMTAwMDAwLDA%3D"
}

List workspaces with encryption details

範例要求

GET https://api.fabric.microsoft.com/v1/admin/workspaces?encryptionStatus={encryptionStatus}&include=encryption

範例回覆

{
  "workspaces": [
    {
      "id": "abf49964-6f70-4aea-a66c-4b78a22e3ddc",
      "name": "Contoso Workspace 1",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "61d6811f-7544-4e75-a1e6-1c59c0383312",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9",
      "encryption": {
        "status": "Disabled"
      }
    },
    {
      "id": "9c7f06cc-e850-4961-b2bd-181a70b1a784",
      "name": "Contoso Workspace 2",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e84",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9",
      "encryption": {
        "status": "Disabled"
      }
    },
    {
      "id": "90119767-07b4-4657-82ee-53e90fece225",
      "name": "Contoso Workspace 3",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "61d6811f-7544-4e75-a1e6-1c59c0383312",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9",
      "encryption": {
        "status": "Active",
        "keyIdentifier": "https://westus07112025-cmktest1.vault.azure.net/keys/test2k/"
      }
    },
    {
      "id": "adaa3051-b1de-41ed-b1b4-d5e08887c1e9",
      "name": "Contoso Workspace 4",
      "type": "Workspace",
      "state": "Active",
      "capacityId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e84",
      "domainId": "039bd896-b39c-4540-93e3-e9926de135f9",
      "encryption": {
        "status": "EnableInProgress",
        "keyIdentifier": "https://westus07112025-cmktest1.vault.azure.net/keys/test2k/",
        "previousStatus": "Active",
        "previousKeyIdentifier": "https://westus07112025-cmktest1.vault.azure.net/keys/test4k/"
      }
    }
  ],
  "continuationUri": "https://api.fabric.microsoft.com/v1/admin/workspaces?continuationToken='LDEsMTAwMDAwLDA%3D'",
  "continuationToken": "LDEsMTAwMDAwLDA%3D"
}

定義

名稱 Description
Encryption

使用客戶管理金鑰(CMK)進行工作空間加密細節。

ErrorParameter

一個結構化參數,提供關於錯誤的額外機器可讀上下文。

ErrorRelatedResource

錯誤相關的資源詳細資料物件。

ErrorResponse

錯誤回應。

ErrorResponseDetails

錯誤回應詳細數據。

Workspace

Workspace.

WorkspaceAppliedTag

代表已套用的標籤。

WorkspaceEncryptionStatus

工作區的 CMK 加密狀態。

Workspaces

工作區清單。

WorkspaceState

工作區狀態。 可能會隨著時間新增其他工作區狀態。

WorkspaceType

工作區類型。 可能會隨著時間新增其他工作區類型。

Encryption

使用客戶管理金鑰(CMK)進行工作空間加密細節。

名稱 類型 Description
keyIdentifier

string

加密金鑰識別碼。

previousKeyIdentifier

string

先前的加密金鑰識別碼。

previousStatus

WorkspaceEncryptionStatus

工作區先前的 CMK 加密狀態。

status

WorkspaceEncryptionStatus

工作區的 CMK 加密狀態。

ErrorParameter

一個結構化參數,提供關於錯誤的額外機器可讀上下文。

名稱 類型 Description
message

string

一個人類可讀的參數意義描述。

name

string

參數識別碼。

value

string

這是參數值。

ErrorRelatedResource

錯誤相關的資源詳細資料物件。

名稱 類型 Description
resourceId

string

發生錯誤的資源識別碼。

resourceType

string

發生錯誤的資源類型。

ErrorResponse

錯誤回應。

名稱 類型 Description
errorCode

string

提供錯誤狀況相關信息的特定標識碼,允許服務與其使用者之間的標準化通訊。

isRetriable

boolean

若屬實,請求可重新嘗試。 如果有延遲,請使用 Retry-After 回應標頭來判斷延遲。

message

string

錯誤的人類可讀取表示法。

moreDetails

ErrorResponseDetails[]

其他錯誤詳細數據的清單。

parameters

ErrorParameter[]

結構化參數提供更多機器可讀的錯誤上下文。

relatedResource

ErrorRelatedResource

錯誤相關的資源詳細數據。

requestId

string (uuid)

與錯誤相關聯的要求標識碼。

ErrorResponseDetails

錯誤回應詳細數據。

名稱 類型 Description
errorCode

string

提供錯誤狀況相關信息的特定標識碼,允許服務與其使用者之間的標準化通訊。

message

string

錯誤的人類可讀取表示法。

parameters

ErrorParameter[]

結構化參數提供更多機器可讀的錯誤上下文。

relatedResource

ErrorRelatedResource

錯誤相關的資源詳細數據。

Workspace

Workspace.

名稱 類型 Description
capacityId

string (uuid)

工作區的容量標識碼。

domainId

string (uuid)

工作區的網域 ID。

encryption

Encryption

工作區的加密細節。

id

string (uuid)

工作區識別碼。

name

string

工作區名稱。

state

WorkspaceState

工作區狀態。

tags

WorkspaceAppliedTag[]

已套用標籤的清單。

type

WorkspaceType

工作區類型。

WorkspaceAppliedTag

代表已套用的標籤。

名稱 類型 Description
displayName

string

標籤的名稱。

id

string (uuid)

標記標識碼。

WorkspaceEncryptionStatus

工作區的 CMK 加密狀態。

值 Description
Disabled

工作區加密尚未啟用。

Active

工作區加密是啟用狀態,且工作區是加密的。

EnableInProgress

工作區加密正在啟用。

DisableInProgress

工作區加密會被停用。

Failed

Workspace 加密應用程式失敗。

Workspaces

工作區清單。

名稱 類型 Description
continuationToken

string

下一個結果集批次的令牌。 如果沒有其他記錄,則會從回應中移除。

continuationUri

string

下一個結果集批次的 URI。 如果沒有其他記錄,則會從回應中移除。

workspaces

Workspace[]

網狀架構工作區的清單。

WorkspaceState

工作區狀態。 可能會隨著時間新增其他工作區狀態。

值 Description
Active

工作區為作用中。 孤立的工作區會顯示為作用中。

Deleted

工作區已刪除。

WorkspaceType

工作區類型。 可能會隨著時間新增其他工作區類型。

值 Description
Personal

我的資料夾或我的工作區,用來管理用戶專案。

Workspace

用來管理 Fabric 專案的工作區。

AdminWorkspace

系統管理員監視工作區。 包含系統管理員報告,例如稽核報告和使用量和採用報告。