POST /ws/rest/service/v1/dm/document/update/<document_id>
Purpose
Provide the ability to modify the metadata for a particular document using the node id.
Input
Path Parameter
- document_id : Node id of the document which needs to be updated.
- Use “Get Folder or Document meta data by path” REST Service to get the node_id value for the document.
Form Data (content Type: application/x-www-form-urlencoded)
- data (JSON String) Required: List of field and values for the document attribute form.
Example:
URL: http://<host>:<port>/ws/rest/service/v1/dm/document/update/298717
To update a document "dm1.PNG" under ""/test" the data must be:
projectnumber:B-001
data:[{"Path":"/test/dm1.PNG","Name":"dm1.PNG","Owner":"Company Administrator","Creation Date":"01/01/2016","% Complete":"100","Description":"dm1.PNG data" }]
Use the GET call to get the structure of the JSON data.
Output
JSON object containing 'status', 'data', 'message'
Response in case of success:
{ "data": [ { "Path":"/test/dm1.PNG", "Creation Date":"01/01/2016", "Owner":"Company Administrator", "Description":"dm1.PNG data", "% Complete":"100", "Name":"dm1.PNG" } ], "message": [ { "message":"OK" } ], "status":200 }
Response in case of error:
{ "data": [ { "Path":"/test/dm1.PNG", "Creation Date":"01/01/2016", "Owner":"Company Administrator", "Description":"dm1.PNG data", "% Complete":"100", "Name":"dm1.PNG" } ], "message": [ { "message":"Parent path or node id is invalid or does not exists." } ], "status":1039 }