6. External Services

Query Builder makes use of several external services. Each of these must be either set up properly in the configuration file, for values that are valid for the whole Query Builder instance, or be provisioned during runtime, for values that are specific to a certain project.

6.1. Dataset Authorisation Service (DAS)

The DAS is configured for the Query Builder instance as a whole in the configuration file.

DAS_ENABLED

This setting allows you to disable or enable the use of the DAS. Value can be either True or False.

DAS_URL

The URL of the DAS, e.g. http://das:5000/api/v1.

DAS_PASSWORD

The password (shared secret) of the DAS, e.g. secret.

DAS_DEBUG

When enabled, shows more logging of communication with the DAS. Value can be either True or False.

DAS_SSL_VERIFY

When true, verifies the SSL certificate of the DAS server if HTTPS is used.

6.2. XAP Deidentification Server

The XAP Deidentification Server is configured for the Query Builder instance as a whole in the configuration file.

XAPDEID_ENABLED

This setting allows you to disable or enable the use of the XAP Deidentification Server. Value can be either True or False.

XAPDEID_URL

The URL of the XAP Deidentification Server, e.g. http://deid

XAPDEID_USER

The name of the (system) user who has access to the XAP Deidentification Server, e.g. admin.

XAPDEID_PASSWORD

The password of the (system) user who has access to the XAP Deidentification Server, e.g. secret.

XAPDEID_SSL_VERIFY

When true, verifies the SSL certificate of the XAP Deidentification Server if HTTPS is used. Value can be either True or False.

6.3. SFTP Export

SFTP Export can be enabled or disabled for the Query Builder instance as a whole in the configuration file.

SFTP_ENABLED

This setting allows you to disable or enable the use of SFTP Export targets. Value can be either True or False.

The SFTP Export targets themselves need to be provisioned on a per-project basis. This can be accomplished with the following HTTP methods.

6.3.1. POST /api/v1/provision/projects

Create a new project.

Request

{
  "name": "test_project",
  "description": "test_description",
  "authgroup": "test_group",
  "sftp_export": {
    "host": "test_host",
    "port": 22,
    "user": "test_user",
    "password": "test_password",
    "path": "test_path"
  },
  "deid_project_id": 123,
  "owner": "test_owner@mgrid.net"
}

Response

{
  "status": "success",
  "project": 42
}

6.3.2. PUT /api/v1/provision/project/<project_id>

Update an existing project.

Request

{
  "name": "updated_name",
  "description": "test_description",
  "authgroup": "test_group",
  "sftp_export": {
    "host": "test_host",
    "port": 22,
    "user": "test_user",
    "password": "test_password",
    "path": "test_path"
  },
  "deid_project_id": 123,
  "owner": "test_owner@mgrid.net"
}

Response

{
  "status": "success",
  "project": 42
}