POST /ws/rest/service/v1/dm/document/update
Purpose
Provide the ability to modify the metadata for documents under a folder using the folder path value.
Input
Form Data (content Type: application/x-www-form-urlencoded)
- projectnumber (String) Optional. Project number for shell/project level DM. Empty for Company level DM.
- data (JSON String) Required: List of field and values for the document attribute form.
- Path: Specify the full path of the document to update. Example "/Project Documents/Service docs/Folder1/pipeline estimate.doc"
Path is a required field. Other fields are optional.
Example:
URL: http://<host>:<port>/ws/rest/service/v1/dm/document/update
To update a document "dm1.PNG" under "/test" folder the data should must be:
data:[{"Path":"/test/dm1.PNG","Name":"dm1.PNG","Owner":"Company Administrator","Creation Date":"01/01/2016","% Complete":"100","Description":"dm1.PNG df" }]
Use the GET call to get the structure of the JSON data.
Output:
JSON object containing 'status', 'data', 'message'
Note: The read-only fields will not be updated with values from input.
Response in case of success:
{
"data":
[
{
"Path":"/test/dm1.PNG",
"Creation Date":"01/01/2016",
"Owner":"Company Administrator",
"Description":"dm1.PNG df",
"% Complete":"100",
"Name":"dm1.PNG"
}
],
"message":
[
{
"message":"OK"
}
],
"status":200
}
Response in case of error:
{
"data":
[
{
"Path":"/test/dm2.PNG",
"Creation Date":"01/01/2016",
"Owner":"Company Administrator",
"Description":"dm1.PNG df",
"% Complete":"100",
"Name":"d1.PNG"
}
],
"message":
[
{
"message":"Invalid folder name."
}
],
"status":505
}