Get Documents by Path
GET /ws/rest/service/v1/dm/document
Purpose
Provide a web service to retrieve all the documents (files) and meta data under a folder using the folder path.
Input
Query Parameters
- projectnumber (String) Optional. Project number for project/shell level DM. Empty for Company level DM.
- parentpath (String) Required. Path to a folder in DM
- iszip (String) Optional:
- "yes" to get all the files in a single zip file.
- "no" to get individual files.
Note: In order to finish the call successfully, users must put the parameters in the URL. This Web Service call does not permit users to put the parameters in the body as JSON.
Output
Output will be a multi-part response.
- If iszip option is yes, then the response file part will be a zip file containing all the documents.
- If iszip option is no, then the output will be individual documents in the file part parameter.
Example
There are 2 files b.txt (content is test test) and ucm_migration_issue.txt (content is 1. Most of the cases the wrong file referenced is a report ) under the selected directory.
iszip = no
Response Header
Content-Type = multipart/form-data; boundary=QXL6HDrSIJF1imDRjdgUC8bTbHIq1z4PUZ
Response Body
--5MJDL8Wb3f7FtknE7iXUzMYy-W1KqjuFfd6bye
Content-Disposition: form-data; name="response"
Content-Type: application/octet-stream
Content-Transfer-Encoding: 8bit
{"status":200,"data":[],"message": ""}
--5MJDL8Wb3f7FtknE7iXUzMYy-W1KqjuFfd6bye
Content-Disposition: form-data; name="b.txt"; filename="b.txt"
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
1. Most of the cases the wrong file referenced is a report
--5MJDL8Wb3f7FtknE7iXUzMYy-W1KqjuFfd6bye--
{ "data": [ ], "message": [ ], "status":200 }
iszip = yes
Response Header
Content-Type = application/octet-stream
Response Body
zip file binary data
In case of error:
Output:
{
"data":
[
],
"message":
[
{
"message":"Parent path or node id is invalid or does not exists."
}
],
"status":1039
}
Related Topics
Create Documents by Parent Folder ID
Update Documents Meta Data by Path
Update Document Meta Data by Document ID
Get Documents by Parent Folder ID
Last Published Tuesday, July 1, 2025