DTXS

Python DTXS Client

Prerequisities

Install the client

Sample configuration of the DTXS client looks followingly:

{
  "dtxsClient": {
    "clientId": "your_client_id",
    "clientSecret": "your_client_secret",
    "userName": "your_user_name",
    "userPassword": "your_password",
    "oauthEndpoint": "https://dtxs-server.example.url:29084/realms/YOUR_REALM/protocol/openid-connect",
    "dtxsEndpoint": "http://dtxs-server.example.url:23741/api/v0.04"
  }
}

Run the test

To test the client, simply run ./tests/python.bat in your terminal. You should see available commands, something similar to this:

Usage: test.py <configFile> <command> [arg1] [arg2] ...
Available commands:
  list-databases                          Lists available databases.
  list-records <database>                 Lists records in given database.
  list-documents <database>               Lists documents in given database.
  upload-document <database> <pathToFile> Upload a document to given database.

Upload document using CLI

For example to upload the document to database my-database (this database must exist) from your computer, run following:

./tests/python.bat config.json upload-document my-database c:\path-to-my-document.txt
(C) wai.blue | Rendered using GuideVis