Get Documents by Path

GET /ws/rest/service/v1/dm/document

Purpose

Retrieves all the documents (files) and meta data under a folder using the folder path.

Prerequisites

Ensure the following:

Query Parameters

Specify the following path parameters:

Request Parameter

Required?

Data Type

Description

projectnumber

Yes

String

The shell in which the document is located.

parentpath

Yes

String

The properties of the documents listed under this path.

iszip

No

Boolean

Generates a single zip for the document files if provided. Otherwise retrieves individual files. Valid values include: "yes", and "no".

blockScanPendingFiles

No

Boolean

Blocks or allows the download of files or attachments that have not been scanned for viruses. Valid values include false and true. False (the default) allows the download of unscanned files or attachments while true prevents it.

Note: By default, attachments are downloaded through REST, whether or not they have been scanned for viruses. To download only those attachments that have been scanned and identified as clean, you must use the blockScanPendingFiles parameter.

Note: For a successful response, specify the parameters in the URL. This REST service call does not permit you to specify the parameters in the JSON body.

Response Format

Output is a multi-part response.

Sample Request

Specify the following query parameters:

projectnumber:AP

parentpath:/testingfold4

iszip:no

Sample Success Response

--5MJDL8Wb3f7FtknE7iXUzMYy-W1KqjuFfd6bye

Content-Disposition: form-data; name="response"

Content-Type: text/plain; charset=ISO-8859-1

Content-Transfer-Encoding: 8bit

{"status":200,"data":[],"message": ""}

--5MJDL8Wb3f7FtknE7iXUzMYy-W1KqjuFfd6bye

Content-Disposition: form-data; name=""response(2).tif"; filename="response(2).tif"

Content-Type: application/octet-stream

Content-Transfer-Encoding: binary

test test

--5MJDL8Wb3f7FtknE7iXUzMYy-W1KqjuFfd6bye

Content-Disposition: form-data; name="ucm_migration_issue.txt"; filename="ucm_migration_issue.txt"

Content-Type: application/octet-stream

Content-Transfer-Encoding: binary

*Data from the file*

"data": [ ],

"message": ],

"status":0

}

--epJEmgJS2xCc6yZSOtu25ty6dkCcRntJjsVnPg--

{

"data": [ ],

"message": [ ],

"status":200

}

Sample Failed Request

An invalid folder is specified in the query parameters:

projectnumber:AP

parentpath:/SampleFolder

Sample Failed Response

A failed response is returned in the following format for the above request:

{

"data": [ ],

"message": [{

"message":"Parent path or node id is invalid or does not exists."

}],

"status":1039

}

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

projectnumber

projectnumber is invalid.

602

Project/Shell Number is not correct.

projectnumber

projectnumber is blank and path is not valid.

1039

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

parentpath

parentpath is invalid.

1039

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

parentpath

parentpath is empty or blank.

1039

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

iszip

Random value is provided.

200

Success.

It assumes the default value as "yes' and generates a zip file.

blockScanPendingFiles

Random string is provided.

11008

blockscanpendingfiles should be one of [true, false].

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 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 Tuesday, July 1, 2025