Skip to content

Delete files and directories

You can delete files and directories in Data Ocean using the following DELETE request method.

  • When you delete a file, all versions of the files are deleted.
  • Directories must be empty to be deleted.
  • All files in the directory must be deleted or moved.

Delete a file or files

DELETE {base URL}/api/files/{id}
DELETE {base URL}/api/files?path={file_path}

The delete function is disabled on files that are being copied. A lock will be placed onto the source and the copied file. This lock will prevent both the files from being deleted until the copy operation succeeds including the internal replication.

Delete directory

DELETE {base URL}/api/directories/{directory_id}

Reference Materials

Data Ocean API definition