Creating a Workspace
Function
This API is used to create a workspace.
URI
POST /v1/{project_id}/instances/{instance_id}/workspaces
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Instance ID. |
project_id |
Yes |
String |
Project ID. For how to obtain a project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's API. X-Subject-Token in the response header is the desired user token. For how to obtain a token, see Authentication. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
configs |
No |
Map<String,String> |
Workspace attribute configuration.
|
name |
Yes |
String |
Workspace name. |
description |
No |
String |
Workspace description. |
eps_id |
Yes |
String |
ID of the enterprise project the workspace belongs to. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
configs |
Map<String,String> |
Workspace attribute configuration.
|
create_time |
Long |
Creation time. |
create_user |
String |
Creator. |
description |
String |
Workspace description. |
domain_id |
String |
ID of the account the workspace belongs to. |
eps_id |
String |
ID of the enterprise project the workspace belongs to. |
id |
String |
Workspace ID. |
instance_id |
String |
Instance ID. |
is_default |
Integer |
Whether the workspace is the default one. The value can be 0 or 1. |
name |
String |
Workspace name. |
owner_name |
String |
Workspace owner name. |
project_id |
String |
ID of the project the workspace belongs to. |
update_time |
Long |
Time when workspace details were updated. |
update_user |
String |
Owner who has updated workspace details. |
Example Request
Create a workspace under a project.
/v1/{project_id}/instances/{instance_id}/workspaces { "configs" : { "mode" : "0", "field_show_type" : "0", "only_admin_create_datasource" : "0", "works_authorized" : "0", "works_public" : "1", "works_view" : "0" }, "name": "Test name", "description": "This is a test description.", "eps_id" : "0" }
Example Response
{ "configs" : { "mode" : "0", "field_show_type" : "0", "only_admin_create_datasource" : "0", "works_authorized" : "0", "works_public" : "1", "works_view" : "0" } , "create_time" : 1676984980510, "create_user" : "xxxxxx", "description" : "Description workspace information", "domain_id" : "xxxxxxx", "eps_id" : "xxxxxxxxxx", "id" : "xxxxxxxxxxxxx", "instance_id" : "xxxx7d17c41c414dabaa08f47c7dxxxx", "is_default" : 1, "name" : "Example workspace name", "owner_name" : "xxxxxx", "project_id" : "xxxxxxxb4dac4055888643b3xxxxxx", "update_time" : 1687167926377, "update_user" : "xxxxxxxx" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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