Deleting a Workspace
Function
This API is used to delete a created workspace.
This API applies to the following scenarios: When a workspace is no longer required, or resources need to be cleared, you can use this API to delete the specified workspace. Before using this API, ensure that the workspace exists and you have the permission to delete the workspace. After the deletion is complete, the workspace is permanently removed, and related resources are cleared. If the workspace does not exist or you do not have the operation permission, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
DELETE /v1/{project_id}/workspaces/{workspace_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
workspace_id |
Yes |
String |
Definition: Workspace ID. For details about how to obtain the ID, see Querying the Workspace List. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token. Constraints: N/A Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
workspace_id |
String |
Definition: Workspace ID. For details about how to obtain the value, see Obtaining Workspaces. Range: If no workspaces are available, there is no default value. If a workspace is created and used, use the actual value. |
Example Requests
(Example) Deleting the workspace whose UUID is ccd05d1a553b4e188ea878e7dcb85e47
DELETE https://{endpoint}/v1/{project_id}/workspaces/ccd05d1a553b4e188ea878e7dcb85e47
Example Responses
Status code: 200
Response parameter indicating that a workspace is deleted
{ "workspace_id" : "ccd05d1a553b4e188ea878e7dcb85e47" }
Status Codes
Status Code |
Description |
---|---|
200 |
Response parameter indicating that a workspace is deleted |
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