Objective

It allows to “lock” a document or to “lock for checkout”. It also allows comments and the expected document check-in date. For the “lock” operation it is not necessary to provide the version or the subversion of the document. For the “checkout” operation at least the version must be required. It is not possible to “lock” or “checkout” folders. After a “checkout” operation, it is still possible to use “ShowDocument” method to download the content. DST must be provided.

Parameters

ParameterDescriptionType
libraryeDOCS libraryString
userUser nameString
passwordUser passwordString
formThe name of the form used to create new folders.String
operationIt is mandatory to use one of the following values “lock” or “checkout”.String
commentOptional comments explaining why the doc is being locked or checked-out.String
checkinDateThe expected document check-in date. It must be in the following format “1900-12-31”  year-month-day.Date
clientOptional parameter for the client codeString
projectOptional parameter for the project codeString

Rest Invoke

  • http://localhost:port/GSService/xml/ or http://localhost:port/GSService/json/
  • UriTemplate:
    • “/CheckOutOrLock/?library={library}&user={user}&password={password}&form={form}&docNumber={docNumber}&version={version}&subVersion={subVersion}&operation={operation}&comment={comment}&checkinDate={checkinDate}&client={client}&project={project}”
    • “/CheckOutOrLockDST/?library={library}&user={user}&dst={dst}&form={form}&docNumber={docNumber}&version={version}&subVersion={subVersion}&operation={operation}&comment={comment}&checkinDate={checkinDate}&client={client}&project={project}”

Example

http://localhost:8732/GSService/xml/CheckOutOrLock/?library=DMTESTLEGAL&user=admin&password=owc123&form=LAWPROF&docNumber=310&version=1&subVersion=!&operation=lock&comment=comment&checkinDate=2016-02-24

The method returns 0 if the operation has been successful or -1 if the operation fail.

DST Example

http://localhost:8732/GSService/xml/CheckOutOrLockDST/?library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&docNumber=310&version=1&subVersion=!&operation=lock&comment=comment&checkinDate=2016-02-24

Error

As this method returns integer type detailed errors can be found in the error log. See Appendix D for more information about the edocs.log file.