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 shell/project 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. Default is "
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
}