This API is used to obtain details about a workspace.
GET /v1/{project_id}/workspaces/{workspace_id}
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. |
None
Status code: 200
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:
|
enterprise_project_id |
String |
Enterprise project ID |
enterprise_project_name |
String |
Name of an enterprise project |
status |
String |
Workspace status. Options:
|
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. |
Querying Details About a Workspace
GET https://{endpoint}/v1/{project_id}/workspaces/{workspace_id}
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 Code |
Description |
---|---|
200 |
OK |
400 |
BadRequest |
403 |
Forbidden |
500 |
InternalServerError |
See Error Codes.