• Workspace

workspace
  1. Help Center
  2. Workspace
  3. API Reference
  4. Desktops
  5. Deleting Desktops

Deleting Desktops

Function

This interface is used to delete a desktop. A deleted desktop cannot be restored.

URI

  • URI format

    DELETE /v1.0/{project_id}/desktops/{desktop_id}

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

    desktop_id

    Yes

    string

    Specifies the desktop ID.

  • Optional parameters

    Parameter

    Mandatory

    Type

    Description

    delete_users

    No

    string

    After a desktop is deleted, if the current user does not have other desktops, the user can be deleted. Possible values are as follows:

    • true: Delete the user.
    • false: Do not delete the user.

    The default value is false.

Request

  • Request example
DELETE /v1.0/29dfe82ada564ac2b927e1ff036d9a9b/desktops/bae51750-0089-41a1-9b18-5c777978ff6d?delete_users=true

Response

No response body

Returned Values

  • Normal

    204

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The request syntax is incorrect and cannot be understood by the server.

    401 Unauthorized

    Authentication fails.

    403 Forbidden

    You are not authorized to perform the operation.

    404 Not Found

    The requested resource is not found.

    405 Method Not Allowed

    The method specified in the request is not allowed.

    500 Internal Server Error

    Internal service error. For details about error codes, see Error Code Description.

    503 Service Unavailable

    The service is unavailable.