Help Center/ ModelArts/ API Reference/ Workspace Management/ Querying Details About a Workspace
Updated on 2025-08-20 GMT+08:00

Querying Details About a Workspace

Function

This API is used to obtain details about a workspace.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/workspaces/{workspace_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

workspace_id

Yes

String

Workspace ID For details about how to obtain the value, see Querying the Workspace List. If no workspace is created, the default value is 0. If a workspace is created and used, the actual value prevails.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

grants

Array of grants objects

List of authorized users, which is left blank by default. This parameter must be used with auth_type and takes effect only when auth_type is set to INTERNAL.

owner

String

Creator username

auth_type

String

Authorization type. The value can be PUBLIC, PRIVATE, or INTERNAL. The default value is PUBLIC.

  • PUBLIC: accessible to tenants

  • PRIVATE: accessible only to the creator and primary account

  • INTERNAL: accessible to the creator, primary account, and specified IAM users. This parameter must be used together with grants.

enterprise_project_id

String

Enterprise project ID

update_time

Integer

Last modification time, in UTC format

create_time

Integer

Time when a workspace was created, in UTC format

enterprise_project_name

String

Enterprise project name

name

String

Workspace name The value contains 4 to 64 characters, including uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). In addition, default is the default workspace name reserved by the system. You cannot create a workspace named default.

description

String

Workspace description. By default, this parameter is left blank. Enter 0 to 256 characters.

id

String

Workspace ID, which is a 32-bit UUID generated by the system without hyphens (-).

status

String

Workspace status.

  • CREATE_FAILED: The creation fails.

  • NORMAL: The status is normal.

  • DELETING: The volume is being deleted.

  • DELETE_FAILED: The deletion fails.

status_info

String

Status description. By default, this parameter is left blank. This parameter is used to show detailed information about a status. If a deletion failed, you can use this parameter to obtain the failure cause.

Table 4 grants

Parameter

Type

Description

user_id

String

IAM user ID. Either this parameter or user_name must be configured. If both of them are available, user_id will be used preferentially.

user_name

String

IAM username. Either this parameter or user_id must be configured.

Example Requests

GET https://{endpoint}/v1/{project_id}/workspaces/ccd05d1a553b4e188ea878e7dcb85e47

Example Responses

Status code: 200

The details about a workspace are obtained.

{
  "id" : "**d05d1a553b4e188ea878e7dcb85e**",
  "name" : "test-workspace",
  "status" : "NORMAL",
  "status_info" : "",
  "description" : "",
  "owner" : "testUser",
  "create_time" : 1470000020000,
  "update_time" : 1470000030000,
  "enterprise_project_id" : "***b0091-887f-4839-9929-cbc884f1e***",
  "enterprise_project_name" : "test-eps",
  "auth_type" : "INTERNAL",
  "grants" : [ {
    "user_id" : "***55d2cd53b4x458ea878e7dcb85***",
    "user_name" : "test-iam-user"
  } ]
}

Status Codes

Status Code

Description

200

The details about a workspace are obtained.

Error Codes

See Error Codes.