Objective

It allows to upload a new document version or subversion into the library but, in this case, it is necessary to provide the content of the document in Base64Binary. DST must be provided.

Parameters

ParameterDescriptionType
documentThe content of the document version or subversion to upload to the DM Library.String
formThe name of the form used to create new folders.String
libraryeDOCS libraryString
userUser nameString
passwordUser passwordString
docNumberDocument number. Only one document number is allowed.String
versionVersion number of the document. (1, 2, 3 …).String
actionsOnly “version” or “subversion” values are allowed. If “action” = subversion then “version” parameter must be provided.String
commentsVersion or subversion comments.String
authorVersion or subversion author (must be a valid user on DM).String
typistVersion or subversion typist (must be a valid user on DM).String
fileExtensionOptional parameter, extension of file (xls, pdf, docx…).String
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:
    • “/UploadVersionOrSubversionAsBinary/?document={document}&form={form}&library={library}&user={user}&password={password}&docNumber={docNumber}&version={version}&action={action}&comments={comments}&author={author}&typist={typist}&fileExtension={fileExtension}&client={client}&project={project}”
    • “/UploadVersionOrSubversionAsBinaryDST/?document={document}&form={form}&library={library}&user={user}&dst={dst}&docNumber={docNumber}&version={version}&action={action}&comments={comments}&author={author}&typist={typist}&fileExtension={fileExtension}&client={client}&project={project}”

Example

http://localhost:8732/GSService/xml/UploadVersionOrSubversionAsBinary/?document=RXN0byBlcyB1bmEgcHJ1ZWJhIHBhcmEgc3ViaXIgdW4gZG9jdW1lbnRvIHkgY29udmVydGlyIHN1IGNvbnRlbmlkbyBhIEJhc2U2NA==&form=LAWPROF&library=DMTESTLEGAL&user=admin&password=owc123&docNumber=757&version=2&action=version&comments=prueba_version2&author=admin&typist=admin&fileExtension=pdf

The method returns the new “Version_ID” number that has been created in the VERSIONS DM table if the version or subversion is properly created or an error if the operation fails.

DST Example

http://localhost:8732/GSService/xml/UploadVersionOrSubversionAsBinaryDST/?document=RXN0byBlcyB1bmEgcHJ1ZWJhIHBhcmEgc3ViaXIgdW4gZG9jdW1lbnRvIHkgY29udmVydGlyIHN1IGNvbnRlbmlkbyBhIEJhc2U2NA==&form=LAWPROF&library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&docNumber=757&version=2&action=version&comments=prueba_version2&author=admin&typist=admin&fileExtension=pdf

Error

Detailed errors can be found in the error log. See Appendix D  for more information about the edocs.log file.