Listing Workspaces
Function
This API is used to list workspaces. This API is synchronous.
Calling Method
For details, see Calling APIs.
URI
GET /v2/workspaces
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Definition: Enterprise project ID. For details about how to obtain the ID, see Obtaining an Enterprise Project ID. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. Default Value: all_granted_eps |
| offset | No | Integer | Definition: Page offset. Constraints: N/A Range: 0 to 10000. Default Value: 0. |
| limit | No | Integer | Definition: Page size. Constraints: N/A Range: 1 to 1000. Default Value: 100. |
| name | No | String | Definition: Workspace name. Constraints: N/A Range: 4 to 32 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Default Value: N/A |
| id | No | String | Definition: Workspace ID, which can be obtained by calling the Obtaining a Workspace ID API. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| tags | No | Array of strings | Definition: Tag filter criteria, supporting multiple tags. Range: Format: key#value1,value2. Separate multiple values with commas (,). Constraints: Up to 10 tags. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition: User token. It is obtained by calling the Obtaining an IAM User Token API. Constraints: N/A Range: Up to 65,534 characters. Only letters, digits, and special characters are allowed. The token format is defined by IAM. For details about the character set, see the IAM documentation. Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Definition: Total number of records. Range: N/A |
| workspaces | Array of Workspace objects | Definition: Workspace list, where each element is a Workspace object containing the workspace ID, name, description, creation time, and other information. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: Workspace ID. Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed. |
| name | String | Definition: Workspace name. Range: 4 to 32 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
| description | String | Definition: User-entered description. Range: 0 to 255 characters. Exclamation marks (!), less-than signs (<), greater-than signs (>), equal signs (=), ampersands (&), double quotation marks ("), single quotation marks ('), at signs (@), number signs (#), percent signs (%), semicolons (;), left parentheses ((), right parentheses ()), vertical bars (|), asterisks (*), and backslashes () are not allowed. |
| create_time | String | Definition: Resource creation time, in UTC format, ISO 8601: yyyy-MM-dd'T'HH:mm:ss.SSSXXX. Example: 2025-01-10T03:37:12.000+00:00. Range: N/A |
| create_domain_name | String | Definition: Creator account name. Range: 0 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
| create_user_name | String | Definition: Creator username. Range: 0 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
| metastore_id | String | Definition: Instance ID of the LakeFormation service. You can view it in the instance list on the LakeFormation console or obtain it by calling the LakeFormation API for listing instances. Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed. |
| enterprise_project_id | String | Definition: Enterprise project ID. Range: 0 to 128 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. |
| tags | Array of ResourceTag objects | Definition: Resource tag of a workspace. Each element is a ResourceTag object containing the key (tag key) and value (tag value) fields. |
| Parameter | Type | Description |
|---|---|---|
| key | String | Definition: Resource tag key. Range: 1 to 128 characters. Only letters, spaces, digits, underscores (_), periods (.), colons (:), backslashes (), equal signs (=), plus signs (+), minus signs (-), and at signs (@) are allowed. |
| value | String | Definition: Resource tag value. Range: 0 to 255 characters. Only letters, spaces, digits, underscores (_), periods (.), colons (:), backslashes (), equal signs (=), plus signs (+), minus signs (-), and at signs (@) are allowed. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 408
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Example Requests
List workspaces.
GET /v2/workspaces
Example Responses
Status code: 200
{
"total" : 3,
"workspaces" : [ {
"id" : "6ccab7b6-fe3a-41b6-a215-be37323bd254",
"name" : "AIDataLake-Test-Workspace",
"description" : "AI DataLake test workspace",
"create_time" : "2026-06-23T12:51:21.000+00:00",
"create_domain_name" : "test_domain",
"create_user_name" : "test_user",
"metastore_id" : "0ba8919e-f52c-437f-a590-9ad7ecdb5ed9",
"enterprise_project_id" : "0",
"tags" : [ {
"key" : "environment",
"value" : "test"
}, {
"key" : "creator",
"value" : "postman-script"
}, {
"key" : "purpose",
"value" : "automation-testing"
} ]
}, {
"id" : "61ff9cae-2e9e-46b5-9bcc-fc4e199c83be",
"name" : "test-pool",
"description" : "",
"create_time" : "2026-06-22T08:27:32.000+00:00",
"create_domain_name" : "test_domain",
"create_user_name" : "test_user",
"metastore_id" : "99543e6a-1df6-4bd9-8696-1a2f185f0968",
"enterprise_project_id" : "0",
"tags" : [ ]
}, {
"id" : "e89e105f-3aab-42c9-8fec-da1d2512a7a8",
"name" : "AutoTest",
"description" : "Used for automated billing tests",
"create_time" : "2026-05-14T08:53:45.000+00:00",
"create_domain_name" : "test_domain",
"create_user_name" : "test_user",
"metastore_id" : "99543e6a-1df6-4bd9-8696-1a2f185f0968",
"enterprise_project_id" : "0",
"tags" : [ ]
} ]
} Status code: 400
{
"error_code" : "AIDataLake.00010151",
"error_msg" : "Parameter value is invalid.",
"solution_msg" : "Please input valid parameter value."
} Status code: 401
{
"error_code" : "APIGW.0301",
"error_msg" : "Incorrect IAM authentication information: decrypt token fail.",
"solution_msg" : "Check whether the IAM authentication information is correct."
} Status code: 403
{
"error_code" : "AIDataLake.00010150",
"error_msg" : "The operation is not allowed.",
"solution_msg" : "Check whether the operation is allowed in the current status."
} Status code: 404
{
"error_code" : "AIDataLake.00010009",
"error_msg" : "No resources found.",
"solution_msg" : "Ensure the requested resource exists and the parameters are correct."
} Status code: 408
{
"error_code" : "common.00000408",
"error_msg" : "timeout exception occurred",
"solution_msg" : "Try again later. If the problem persists, contact technical support."
} Status code: 500
{
"error_code" : "AIDataLake.00011001",
"error_msg" : "Internal error.",
"solution_msg" : "Contact technical support or try again later."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request parameters. |
| 401 | Unauthorized. |
| 403 | Access denied. |
| 404 | Resource not found. |
| 408 | Request timeout. |
| 500 | Internal server error. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot