Objective

It allows to upload new document versions or subversions to DM. DST must be provided.

Parameters

ParameterDescriptionType
pathPath of the document to upload (the Web Service account must have access to the path where the document is saved so to upload documents, first separately upload the content to that location and then use this method to upload the document from there to the DM library). The “Network Service” group must have “Read and Execution” permissions on the server folder where the document is stored.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
commentsVersion or subversion comments.String
authorVersion or subversion author (must be a valid user in DM).String
typistVersion or subversion typist (must be a valid user in DM).String
actionOnly “version” or “subversion” values are allowed. If “action” = subversion then “version” parameter must be provided.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:
    • “/UploadVersionOrSubversion/?path={path}&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}”
    • “/UploadVersionOrSubversionDST/?path={path}&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/UploadVersionOrSubversion/path=C:\Users\Admin\Documents\SolutionSchema.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&password=owc123&docNumber=757&version=2&action=version&comments=versión_prueba&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/UploadVersionOrSubversionDST/?path=C:\Users\Admin\Documents\SolutionSchema.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&docNumber=757&version=2&action=version&comments=versión_prueba&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.