Rename a Node by Node ID

POST /ws/rest/service/v1/dm/node/rename/{node_id}

Purpose

Renames a node(folder/document) based on the node id.

Prerequisites

Ensure the following:

Request Format

Send a request in the following format:

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

data: [{"new_node_name":"rename.json","forceful":"yes" }]

Path Parameter

The following path parameter must be included in the request:

Path Parameter

Required?

Data Type

Description

node_id

Yes

Integer

The node (folder/document) that needs to be renamed with the specified node_id.

Request Parameters

The following parameters can be included in the request:

Request Parameter

Required?

Data Type

Description

projectnumber

Yes

Integer

The shell associated with the node (folder/document) that needs to be renamed.

new_node_name

Yes

String

The new name for the specified node.

forceful

No

String

Determines whether to enforce the renaming. Valid values include:

"yes": Forcefully renames the nodes. If a duplicate is found, adds a suffix (1) to the file name. If the name exists, then displays an error.

"no" (default)

Sample Request

To rename a folder/document with node_id 856, give the URL as below:

http://<host>:<port>/ws/rest/service/v1/dm/node/rename/856

data:[{ "new_node_name":"newname"}]

Sample Success Response

A successful response with status code 200 displays in the following format:

{

"data": [{

"Path": "/try",

"node_name_input": "newname",

"Name": "newname.pdf"

}],

"message": [{

"message": "Renamed node successfully"

}],

"status": 200

}

Sample Failed Request

The following request is sent with the new node name identical to the current name:

http://<host>:<port>/ws/rest/service/v1/dm/node/rename/856

data:[{ "new_node_name":"newname.pdf","forceful":"no"}]

Sample Failed Response

A failed response to the above request displays with status code 505 in the following format:

{

"data": [{

"Path": "/try",

"forceful": "no",

"node_name_input": "newname.pdf",

"Name": "newname.pdf"

}],

"message": [{

"message": "New node name and old node name are same"

}],

"status": 505

}

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.

Field Name

Use-case Scenario

Status Code

Error Message

node_id

node_id is invalid.

1069

Node not found.

projectnumber

Projectnumber is invalid.

602

Project/Shell Number is not correct.

new_node_name

New name is identical to the current name.

505

New node name and old node name are same.

new_node_name

Rename with an existing name, and "forceful" parameter is set to "no".

1067

Cannot rename node as the name already exists.

new_node_name

Name is blank / empty

505

New node name is not valid.

forceful

Renames with an existing name, and forceful parameter is set to "yes".

200

Renamed node successfully.

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 Unpublished Document by File ID



Last Published Tuesday, July 1, 2025