Deleting a Workspace
Function
This API is used to delete a workspace.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /v1/{project_id}/{instance_id}/workspaces/batch-delete
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain it, see Project ID and Account ID. |
| instance_id | Yes | String | DataArts Studio instance ID. For details about how to obtain it, see Instance ID and Workspace ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. This parameter is mandatory when Token Authentication is used. You can obtain it from the X-Subject-Token header in the response of the "Obtaining a User Token" API provided by IAM. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspace_ids | Yes | Array of strings | List of workspace IDs to be deleted. For details about how to obtain them, see Instance ID and Workspace ID. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| message | String | Response message. |
| is_success | Boolean | Whether the operation is successful. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Returned error information. |
| error_code | String | Returned error code. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Returned error information. |
| error_code | String | Returned error code. |
Example Requests
{
"workspace_ids" : [ "dee0f3ba02d34ac9b5a5a80eb81a4536", "dee0f3ba02d34ac9b5a5a80eb81a0000" ]
} Example Responses
Status code: 400
Bad request.
{
"error_code" : "DAYU.4402",
"error_msg" : "The operation failed, detail msg {0}."
} Status code: 500
Internal server error.
{
"error_code" : "DAYU.3531",
"error_msg" : "Internal server error: {0}"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The workspace is deleted successfully. |
| 400 | Bad request. |
| 500 | Internal server error. |
What is your overall rating for this page?
Thank 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