Updating a File

You can use the update call to update the metadata of a file. You can use the upload call to update the content of the file.

Sample URL

https://hostname:port/context/rest/v2/documents/update/{id}

Method

POST

Parameters

Parameter Description
id The ID of the document.

This parameter is required if the path parameter is not present.

path The fully qualified File Share path name.

This parameter is required if the id parameter is not present; otherwise, it is ignored.

name Optional.

The file name.

comments Optional.

Comments on the file.

dateModified Optional.

An integer representation of the time when the file is modified on the client device. The default value is the database time.

Response

Example:

{"latestVersion":"0","id":"51cf5053-f105-4f0a-a42d-fef4d37df967","lastUpdatedBy":"UserId1","name":"new file name","lastUpdatedOn":1371060725117 }