Open Documentation Menu

Using the d.velop documents repo export client

d.velop documents repo exporter is a client solution that can communicate directly with the export API (cloud and on-premises). d.velop documents repo exporter lets you simplify data exports for your customers.

This is a client application that you can start from the Windows command prompt. You can obtain the client via the d.3 server tools package. The client abstracts the HTTP communication to the export API and loads the configured documents to a definable target directory.

The client application provides the following functions:

  • You can set the client using the configuration file and start it with appropriate parameters.

  • You can use d.velop logfile viewer (d.3 logview) for logging. You can also specify that messages are logged in a separate text file.

Prerequisites:

  • The export API is accessible, installed and activated.

  • An export directory on which the metadata and the original files can be saved is available. During the export, the documents are saved based on the directory structure (document tree).

Structure of the “Config.json” file

The configuration file includes the following:

  • The user information for the source system (on-premises: user name and password, cloud: repository ID and API key)

  • URL at which d.velop documents repo exporter can be accessed.

  • Filter for defining the documents to be exported.

Note

The base address of the export API is logged in the output at the start.

The configuration file is structured as follows:

{
  "baseUrl" : "<http://127.0.0.1:8333>",
  "user" : "<exportUser>",
  "password" : "<passsword>",
  "repoId" : "<uuid>",
  "apikey" : "<apikey>",
  "timeout" : "<seconds>",
  "proxyPort" : "<port>",
  "proxyHost" : "<ProxyIp>",
  "filter" : {
      "modifiedAfter": "<2017-11-07T13:27:37.643Z>",
      "modifiedBefore": "<2023-01-01T01:01:01.001Z>",
      "numberOfProcesses": <2>,
      "documentTypesByD3Id": [],
      "documentTypesById": [],
      "docIds": [],
      "batchSize": <200>
  }
}

Unless otherwise defined, you can also enter all the parameters from the command prompt in the configuration file.

Below you can find descriptions of the parameters in the configuration file:

Parameter

Description

user

User name of the user with permissions for exports

More information about distributing permissions: Configuring user rights for the cloud

password

Optional: Password of the user exporting the files

apikey

Relevant for the cloud: API key of the user with permissions for exports

timeout

Optional: Request Timeout

Default: 300 seconds

filter

Restricting filter for the data export

More information: Defining the export filter

Starting the client through a Windows command prompt

You can start d.velop documents repo exporter with the Windows command prompt (cmd). Add the following command prompt and adapt the values to your requirements:

export_client.exe --configFile <pathToConfig.json> <optionale Parameter>

The export is performed automatically after the application starts.

Below you can find descriptions of the parameters of the command prompt:

Parameter

Optional

Description

--configFile

n

Path to the configuration file for the client. Must be transferred when the application is started.

--baseUrl

n

Base address of the d.velop documents repo exporter API.

--exportPath

n

Path to the target directory for the export (saving the original file and the associated metadata) Must be transferred in the command prompt or configuration file.

--repoId

-

Repository ID of the d.velop documents system to be exported.

  • Mandatory when using the export API embedded in d.velop documents. This applies to current d.velop documents systems and exports from the cloud.

  • If you are using the standalone d.velop documents repo export API, you must leave this configuration value out. The d.velop documents system to be exported is defined using the d.velop documents repo exporter API start parameters.

--exportWithFiletype

n

This configuration enables exports retaining known file extensions. This mode is not suitable for subsequent migrations or imports to d.velop documents.

--exportMetadataOnly

n

Only the metadata from d.velop documents is exported. This mode can be used to analyze metadata, for example.

--exportRepositoryConfigOnly

n

The client requests only the configuration of the d.velop documents system to be exported and closes after the configuration is saved.

--logFile (optional)

n

Path and name of a log file.

The file contains the whole export log and is added to on an ongoing basis. The file is not rolling and can therefore take up a large amount of storage space.

We recommend producing a backup copy of the file before running d.velop documents repo exporter again.

--logLevel (optional)

n

Log level (default: 6)

The values are between 0 and 9 (0: no logging, 9: maximum debug logging).

--proxyHost

n

Host name or IP of an HTTP/HTTPS proxy. Authentication on the proxy is not supported.

--proxyPort

n

Port of an HTTP/HTTPS proxy

--ignoreCertificates

n

Allows the use of invalid and self-signed certificates.

--startLink

n

Use this parameter if a previous export failed and you know the URL of the last successful block. This start parameter bypasses any defined filters.

--help

n

Displays a help text for the start parameters and closes the application.

How to export from the cloud: Enter the relevant values in the configuration file for the parameters repoId and apikey.

The documents are then saved in the specified folder (exportPath) based on the directory structure (document tree), together with the JSON display of the metadata. If you selected the applicable option, the master data is also saved in the specified folder.

Behavior in the event of errors

Information about exported documents is saved in the files error_log_<number>.json. The files are numbered sequentially. The files are created after 1,000,000 documents or after 100 errors. After 100,000 documents, a log is written.

Example of an error in “error_log_0.json”:

 {
  "errorBatches": [
    {
      "filter": {
        "docIds": [
          "P000000005",
          "P000000079",
          "P000009725",
          "P000009729",
          "P000009731",
          "P000009733",
          "P000009735",
          "P000009737",
          "P000009739",
          "P000009742"
        ]
      },
      "link": "/repo/export?startDocId=P000000005&batchNumber=0&docIds=P000000005,P000000079,P000009725,
P000009729,P000009731,P000009733,P000009735,P000009737,P000009739,P000009742&bS=100"
    }
  ]
}

Description:

  • filter: When the tool is restarted, you can use this parameter to reexport specific document IDs that were not exported.

  • link: This parameter is the endpoint that caused the error. You can use the endpoint for debugging with external tools.

/dmsdocs