All Products
Search
Document Center

Platform For AI:GetWorkspace

Last Updated:Oct 20, 2025

Retrieves the details of a workspace.

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

paiworkspace:GetWorkspace

get

*Workspace

acs:paiworkspace:{#regionId}:{#accountId}:workspace/{#WorkspaceId}

None None

Request syntax

GET /api/v1/workspaces/{WorkspaceId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The workspace ID. For more information about how to obtain a workspace ID, see ListWorkspaces.

12345

Request parameters

Parameter

Type

Required

Description

Example

Verbose

boolean

No

Specifies whether to return additional information, such as the workspace owner. Valid values:

  • false (default): Does not return additional information.

  • true: Returns additional information.

true

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

A0F049F0-8D69-5BAC-8F10-B4DED1B5A34C

WorkspaceId

string

The workspace ID.

1234

WorkspaceName

string

The workspace name.

workspace-example

GmtCreateTime

string

The time when the workspace was created. The time is in UTC and follows the ISO 8601 standard.

2021-01-21T17:12:35.232Z

GmtModifiedTime

string

The time when the workspace was last modified. The time is in UTC and follows the ISO 8601 standard.

2021-01-21T17:12:35.232Z

DisplayName

string

The display name of the workspace.

workspace-example

Description

string

The description of the workspace.

workspace description example

EnvTypes

array

The environments that the workspace contains. Valid values:

  • A workspace in basic mode has only the production environment (prod).

  • A workspace in standard mode has both the development environment (dev) and the production environment (prod).

string

The environment type. Valid values:

  • dev: the development environment.

  • prod: the production environment.

prod

Creator

string

The ID of the user who created the workspace.

1157******94123

Status

string

The status of the workspace. Valid values:

  • ENABLED: The workspace is running as normal.

  • INITIALIZING: The workspace is being initialized.

  • FAILURE: The workspace failed to be created.

  • DISABLED: The workspace is manually disabled.

  • FROZEN: The workspace is frozen due to an overdue payment.

  • UPDATING: The workspace is being updated.

ENABLED

AdminNames

array

The list of administrator account names.

string

The administrator account name. This parameter is returned only when Verbose is set to true.

demo_test@***.aliyunid.com

IsDefault

boolean

Indicates whether the workspace is the default workspace. Valid values:

  • false: The workspace is not the default workspace.

  • true: The workspace is the default workspace.

true

ExtraInfos

object

Additional information. This parameter currently contains the tenant ID (TenantId).

{"TenantId": "4286******98"}

Owner

object

The information about the workspace owner. This parameter is returned only when Verbose is set to true.

UserKp

string

The user UID.

1157******94123

UserId

string

The user ID.

1157******94123

UserName

string

The username.

mings****t

DisplayName

string

The display name.

mings****t

ResourceGroupId

string

The resource group ID.

rg-acfmwp7rkyq****

Examples

Success response

JSON format

{
  "RequestId": "A0F049F0-8D69-5BAC-8F10-B4DED1B5A34C",
  "WorkspaceId": "1234",
  "WorkspaceName": "workspace-example",
  "GmtCreateTime": "2021-01-21T17:12:35.232Z",
  "GmtModifiedTime": "2021-01-21T17:12:35.232Z",
  "DisplayName": "workspace-example",
  "Description": "workspace description example",
  "EnvTypes": [
    "prod"
  ],
  "Creator": "1157******94123",
  "Status": "ENABLED",
  "AdminNames": [
    "demo_test@***.aliyunid.com"
  ],
  "IsDefault": true,
  "ExtraInfos": {
    "TenantId": "4286******98"
  },
  "Owner": {
    "UserKp": "1157******94123",
    "UserId": "1157******94123",
    "UserName": "mings****t",
    "DisplayName": "mings****t"
  },
  "ResourceGroupId": "rg-acfmwp7rkyq****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.