Skip to main content

Delete a file or empty workspace directory

DELETE 

/session/files

Deletes one file, symbolic link or empty directory in the session's workspace and answers 204 with no body. A symbolic link is removed itself; its target is left alone, and a link whose target no longer exists can still be removed. Nothing is deleted recursively.

  • A directory that still has entries answers 409 CONFLICT.
  • The path follows the rules of GET /session/files. The workspace root cannot be deleted: an empty path or . answers 403 WORKSPACE_NOT_ALLOWED.
  • A session that does not exist answers 404 SESSION_NOT_FOUND, and a path that does not exist answers 404 NOT_FOUND.

Request​

Responses​

The path was deleted.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.