All Products
Search
Document Center

Data Management:ListWorkspaces

Last Updated:Aug 28, 2026

Retrieves the workspace list for a tenant.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:ListWorkspaces

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AlreadyJoined

boolean

No

Whether the current user has joined the workspace.

true

SearchKey

string

No

The search keyword. Fuzzy match is supported.

poc_test

Region

string

No

The region in which the bucket is located.

cn-hangzhou

ServiceAccountId

integer

No

The service account ID.

12345

WorkspaceId

integer

No

The workspace ID.

12****

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page.

10

VpcId

string

No

The virtual private cloud (VPC) ID.

Note

This parameter cannot be used as a filter.

vpc-bp10wnlcmor****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

EE214ECD-4330-503A-82F0-FFB03975****

ErrorCode

string

The error code.

UserNotExist

ErrorMessage

string

The error message returned if the request failed.

UnknownError

Success

boolean

Whether the request was successful. Valid values:

  • true: The request succeeded.

  • false: The request failed.

true

TotalCount

integer

The total number of workspaces that meet the conditions.

10

Data

object

BaseWorkspaces

array<object>

The dataset.

object

Description

string

The description of the workspace.

Test

CreatorId

integer

The ID of the creator.

123

OwnerUid

string

The Alibaba Cloud UID of the owner.

15608564799****

WorkspaceId

integer

The workspace ID.

8652340494****

GmtModified

string

The update time.

2025-01-01 00:00:00

ServiceAccountId

integer

The ID of the service account.

12345

CreatorUid

string

The Alibaba Cloud account UID of the creator.

1344****

ServiceAccountNickName

string

The nickname of the service account.

testname

Name

string

The name of the workspace.

workspace-xxxx

AlreadyJoined

boolean

Whether the current user has joined the workspace.

true

TenantId

integer

The ID of the tenant to which the workspace belongs.

23456

GmtCreate

string

The creation time.

2025-01-01 00:00:00

ServiceAccountUid

string

The Alibaba Cloud account UID of the service account.

1422****

OwnerId

integer

The owner ID.

123****

VpcId

string

The VPC ID.

vpc-25fl3qjqb****

Region

string

The region ID.

cn-hangzhou

WorkspaceName

string

The name of the workspace.

test-workspace

CreatorNickName

string

The nickname of the creator.

work*****

OwnerNickName

string

The nickname of the owner.

hel****

NextToken

string

NextToken does not take effect.

token-xxx

MaxResults

integer

The total number of workspaces that meet the conditions, same as the TotalCount parameter.

10

Examples

Success response

JSON format

{
  "RequestId": "EE214ECD-4330-503A-82F0-FFB03975****",
  "ErrorCode": "UserNotExist",
  "ErrorMessage": "UnknownError",
  "Success": true,
  "TotalCount": 10,
  "Data": {
    "BaseWorkspaces": [
      {
        "Description": "Test",
        "CreatorId": 123,
        "OwnerUid": "15608564799****",
        "WorkspaceId": 0,
        "GmtModified": "2025-01-01 00:00:00",
        "ServiceAccountId": 12345,
        "CreatorUid": "1344****",
        "ServiceAccountNickName": "testname",
        "Name": "workspace-xxxx",
        "AlreadyJoined": true,
        "TenantId": 23456,
        "GmtCreate": "2025-01-01 00:00:00",
        "ServiceAccountUid": "1422****",
        "OwnerId": 0,
        "VpcId": "vpc-25fl3qjqb****",
        "Region": "cn-hangzhou",
        "WorkspaceName": "test-workspace",
        "CreatorNickName": "work*****",
        "OwnerNickName": "hel****"
      }
    ]
  },
  "NextToken": "token-xxx",
  "MaxResults": 10
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.