Delete Folders by Node ID

POST /ws/rest/service/v1/dm/folder/delete/<node_id>

Purpose

Delete folders using the node_id.

Prerequisites

Ensure you have:

Request Format

Form Data (content type : application/x-www-form-urlencoded)

Path Parameter

The following parameter must be specified in the request:

Path Parameter

Required?

Data Type

Description

node_id

Yes

Integer

The node ID of the folder to be deleted.

Response Format

A JSON object is returned in the following format:

{

"data": [],

"message": [<list of messages>],

"status": <REST status code value>,

"rest_audit_id": <id from the audit table>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Success Request

Send a request to delete a folder with node_id 555 in the following format:

http://localhost:7003/ws/rest/service/v1/dm/folder/delete/555

Sample Success Response

A successful response returns a status code 200 in the following format:

{

"data": [],

"message": [{"message":"Folder/File successfully deleted. Please check in Recycle bin."}],

"status":200

}

Sample Failed Response

An incorrect node_id specified in the request returns a response with an error status code and message in the following format:

{

"data": [],

"message": [{"message":"Node path or node id is invalid or does not exists."}],

"status":12764

}

Supported Validation Messages and Status Codes

The following validation messages and status codes display in the response when incorrect values are provided in the request:

Use-case Scenario

Status Code

Error Message

Files inside folder linked to bp records

12762

Files in the folder or sub-folders is linked to BP Records/Reports and cannot be deleted.

Files inside folder included in checkout or locked documents.

12763

Files in the folder or sub-folders is include checked out or locked documents.

Node ID or path is invalid or incorrect.

12764

Node path or node id is invalid or does not exists.

File or folder successfully deleted.

200

Folder/File successfully deleted. Please check in Recycle bin.

Project/Shell number is incorrect.

602

Project/Shell Number is not correct.

Project/Shell is inactive.

1245

Create/Update/Delete cannot be performed when project/shell status is Inactive or View-Only or On-Hold.

delete document is root node.

12768

You cannot delete the 'Project Documents' folder.

Related Topics

Folder Services

Create Folders by Path

Create Folders by Parent Folder ID

Update Folder Metadata by Path

Update Folder Metadata by Folder ID

Get Folders or Documents Metadata by Path

Get Folders or Documents Metadata by Parent Folder ID



Last Published Tuesday, April 15, 2025