Skip Navigation

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:
  • ETag: This value provides the unique identifier for the current version of the data (file). 
  • Last-Modified: This value specifies the system last modified time for a file. 
  • Accept-Ranges: The server informs the client that it supports the range requests. 
  • Content-Length: The server returns a byte range to the client when responding to a range request. 
For chunked and resumable downloads, the following HTTP headers are optional:
  • Input HTTP request headers:
    • Range: Specifies the range of bytes for the client to download 
    • If-Range: ETag to match for range downloads 
  • Output HTTP response headers:
    • Content-Range: Specifies the byte range returned
Optional parameters:
  • storagePath*
  • unprotected=true: This parameter specifies if unprotected contents of an RMS protected document are sent to the client. 
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:
  • storagePath*
  • includeRMSPermissions=true: This parameter specifies if RMS permissions information is included when the document is RMS protected. 
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:
  • storagePath*
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 
SharePoint
 server. 
The optional request body is JSON, as shown in the following example:
{ "comments":"
comments
" }
The 
comments
 value can provide information for the checked out document.
Optional parameters:
  • storagePath*
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 
SharePoint
 server. 
The optional request body is JSON, as shown in the following example:
{ "type":"checkin-type", "comments":"comments" }
  • The 
    checkin-type
     value is any checkin value supported by the underlying storage. For 
    Microsoft SharePoint
    , this can be one of the following:
    • major
    • minor
    • overwrite
    By default, when the checkin-type is not specified it is major.
  • A complete JSON body as well as the individual elements (type and comments) are optional.
Optional parameters:
  • storagePath*
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:
  • storagePath*
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:
{ "version":"
doc-version
" }
The 
doc‐version
 value is the version number of the document. 
Optional parameters:
  • storagePath*
* 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