Delete Documents by Node ID

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

Purpose

Delete documents 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 document 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/580

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 are inked to BP records

12766

The file is linked to BP Records/Reports and cannot be deleted.

Selected file is included in checkout or locked documents.

12767

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 exist.

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.

Related Topics

Document Services

Create Documents by Path

Create Documents by Parent Folder ID

Update Document's Metadata by Path

Update Document Metadata by Document ID

Get Documents by Path

Get Documents by Parent Folder ID

Get Document as Tiff File

Get Document by File ID

Search Document or Folder Properties

Rename a Node by Node ID

Rename Unpublished Document by File ID



Last Published Wednesday, April 9, 2025