Objective

It allows  to change the content of document. (Only the content is changed, the profile is not modified). 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:
o Upload the content to that location
o Use ReplaceContent method to upload the document from there into 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 …).Long
subVersionSubversion letter (A, B, C, …). No letter will be used by default.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:
    • “/ReplaceContent/?path={path}&form={form}&library={library}&user={user}&password={password}&docNumber={docNumber}&version={version}&subVersion={subVersion}&client={client}&project={project}”
    • “/ReplaceContentDST/?path={path}&form={form}&library={library}&user={user}&dst={dst}&docNumber={docNumber}&version={version}&subVersion={subVersion}&client={client}&project={project}”

Example

http://localhost:8732/GSService/xml/ReplaceContent/?path=C:\Users\Admin\Documents\GadgetsScreenMock.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&password=owc123&docNumber=754&version=1&subVersion=!

The method returns the document number if the content of the document has been successfully replaced.

DST Example

http://localhost:8732/GSService/xml/ReplaceContentDST/?path=C:\Users\Admin\Documents\GadgetsScreenMock.pdf&form=LAWPROF&library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&docNumber=754&version=1&subVersion=!

Error

Check the event.log file if you find errors.