# Querying Details About a Workspace

#### Function

This API is used to obtain details about a workspace.

#### URI

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

Table 1 Path parameters
Parameter | Mandatory | Type | Description
--- | --- | --- | ---
project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
workspace_id | Yes | String | Workspace ID.

#### Request Parameters

None

#### Response Parameters

Status code: 200

Table 2 Response body parameters
Parameter | Type | Description
--- | --- | ---
id | String | Workspace ID, which is a 32-bit UUID generated by the system without hyphens (-). The ID of the default workspace is 0.
name | String | Workspace name
description | String | Workspace description. Enter 0 to 256 characters.
owner | String | Creator name. Enter 0 to 64 characters.
create_time | Number | Time when a workspace was created, in UTC format
update_time | Number | Last modification time, in UTC format

auth_type

String

Authorization type. Options:

- PUBLIC: public access of tenants (default value)

- 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
enterprise_project_name | String | Name of an enterprise project

status

String

Workspace status. Options:

- CREATE_FAILED: Creating the workspace failed.

- NORMAL: The workspace is running properly.

- DELETING: The workspace is being deleted.

- DELETE_FAILED: Deleting the workspace failed.

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.
grants | Array of grants objects | List of authorized users, which is left blank by default. This parameter must be used together with auth_type and takes effect only when auth_type is set to INTERNAL.

Table 3 grants
Parameter | Type | Description
--- | --- | ---
user_id | String | User ID. Either this parameter or user_name must be set. If both of them are set, user_id is used preferentially.
user_name | String | IAM username. Either this parameter or user_id must be set.

#### Example Requests

Querying Details About a Workspace

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

#### Example Responses

Status code: 200

OK

    {
      "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 | OK
400 | BadRequest
403 | Forbidden
500 | InternalServerError

#### Error Codes

See Error Codes.

Parent topic: Workspace Management