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}
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
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
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. |
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. |
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. |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot