Document version-related functions
    These functions are available where document versions is supported (for example, 
Microsoft
  SharePoint
).| Function | REST Call URI | Verb | Description | 
|---|---|---|---|
| Download a specific version of a document | http(s)://{ FQDN of the BEMS-Docs server}:8443/docs/{version}/{ repository}/{ filename-with-path}?version={ doc‐version} | GET | This function downloads a specific version of a document content to the client.  The content type is not sent to the client. The supported output HTTP headers are:
                   
 For chunked and resumable downloads, the following HTTP headers are optional:
                   
 Optional parameters:
                   
 | 
| Retrieve document metadata for a specific version of document | http(s)://{ FQDN of the BEMS-Docs server}:8443/docs/{version}/{ repository}/{ filename-with‐path} ?metadata&version={doc-version} | GET | This function retrieves the document metadata for a specific version of a document.  Optional parameters:
                   
 | 
| Retrieve document metadata for all versions of a document | http(s)://{ FQDN of the BEMS-Docs server}:8443/docs/{ version}/{ repository}/{ filename-with-path} ?metadata&version=* | GET | This function retrieves the document metadata for all versions of a document.  Optional parameters:
                   
 | 
| Check out a document | http(s)://{ FQDN of the BEMS-Docs server}:8443/docs/{ version}/{ repository}/{ filename-with-path} ?action=checkout | POST | This function checks out a document from the FileShare or  SharePointserver. The optional request body is JSON, as shown in the following example:
                   
 The  commentsvalue can provide information for the checked out document. Optional parameters:
                   
 | 
| Check in a document | http(s)://{ FQDN of the BEMS-Docs server}:8443/docs/{ version}/{ repository}/{ filename-with‐path} ?action=checkin | POST | This function checks a document in to the FileShare or  SharePointserver. The optional request body is JSON, as shown in the following example:
                   
 
 Optional parameters:
                   
 | 
| Undo checking out a document | http(s)://{ FQDN of the BEMS-Docs server}:8443/docs/{ version}/{ repository}/{ filename‐with‐path} ?action=cancelcheckout | POST | This function cancels a document checkout.  Optional parameters:
                   
 | 
| Restore a document version | http(s)://{ FQDN of the BEMS-Docs server}:8443/docs/{ version}/{ repository}/{ filename‐with‐path} ?action=restoreVersion | POST | This function restores the document version to the previous version number.  The version to restore to must be specified in the following JSON format:
                   
 The  doc‐versionvalue is the version number of the document. Optional parameters:
                   
 | 
* Required for documents in flat view and Shared With Me 
Microsoft
  SharePoint
 libraries and specifies the actual path of document** Required for Shared With Me 
SharePoint
 folders and specifies the actual path of the folder