dfws.cf
dfws.db
DFdiscover Release 5.9.0
All rights reserved. No part of this publication may be re-transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of DF/Net Research, Inc. Permission is granted for internal re-distribution of this publication by the license holder and their employees for internal use only, provided that the copyright notices and this permission notice appear in all copies.
The information in this document is furnished for informational use only and is subject to change without notice. DF/Net Research, Inc. assumes no responsibility or liability for any errors or inaccuracies in this document or for any omissions from it.
All products or services mentioned in this document are covered by the trademarks, service marks, or product names as designated by the companies who market those products.
Google Play and the Google Play logo are trademarks of Google LLC. Android is a trademark of Google LLC.
Dec 04 2024
For software support, Please contact the DFdiscover team:
via email, help@dfnetresearch.com.
Visit our website, https://www.dfnetresearch.com.
A number of conventions have been used throughout this document.
Any freestanding sections of code are generally shown like this:
# this is example code code = code + overhead;
If a line starts with # or %, this character denotes the system prompt and is not typed by the user.
#
%
Text may also have several styles:
Emphasized words are shown as follows: emphasized words.
Filenames appear in the text like so: dummy.c.
dummy.c
Code, constants, and literals in the text appear like so: main.c.
main.c
Variable names appear in the text like so: nBytes.
nBytes
Text on user interface labels or menus is shown as: Printer name, while buttons in user interfaces are shown as Button .
Menus and menu items are shown as: File > Exit.
DFws is an application programming interface (API) service for DFdiscover. It provides a public, session-based interface to DFdiscover resources.
DFws executes as a server-side daemon, talking to one or more DFdiscover servers. It provides session management for authenticated clients, accepts resource requests from clients, passes the requests to study database servers, waits for response and then passes the results back to the authenticated client in a response.
DFws services can be routed through a server maintained by DF/Net Research, Inc., or customers may deploy their own DFws server.
DFws is most useful to clients that need to interact with DFdiscover at a programmatic level. They need to interact with DFdiscover, retrieving or submitting data, in a way that is not already provided by an existing application (such as DFexplore) or a command-line program.
DFweb and DFcollect are examples of authenticated clients that provide interfaces to DFdiscover and DFdiscover data in unique ways. They both request data from DFws, manipulate it through their interfaces, and submit data through DFws to one or more study databases. The data is available to any user with the appropriate permissions and using any of the DFdiscover tools.
What tools can you create that interface with DFdiscover to solve unique clinical trial data management problems?
Before you can develop solutions with DFws, a few essential pieces are needed. These pieces include:
CLIENT_ID
CLIENT_PASS
CLIENT_SECRET
API server base URI
This example uses PHP web page scripts to login to a DFdiscover server, namely explore.dfdiscover.com using a DFws API server, dfws.dfdiscover.com, and request the list of available studies.
explore.dfdiscover.com
dfws.dfdiscover.com
An authorize API request is sent that includes DFdiscover login credentials and an authorization string to authenticate the API client. A sessionID is returned in the response. This sessionID is required to send subsequent requests. Additionally, all subsequent requests require encoding.
authorize
sessionID
For the example, there are five files that must be copied to your php web server environment:
index.php
apirequests.php
studies.php
styles.css
These files will require some editing to specify your unique API server access credentials.
See the list of API resources and API Endpoints for the full details of each endpoint.
<?php $error=''; if (isset($_POST['submit'])) { include('apirequests.php'); // INCLUDE FUNCTIONS FILE if (empty($_POST['server']) || empty($_POST['username']) || empty($_POST['password'])) { $error = "Server, Username and Password must be provided"; } else { $username=$_POST['username']; session_start(); $session_id=login($_POST['server'], $username, $_POST['password'], $error); if (!empty($session_id)) { $_SESSION['session_id']=$session_id; $_SESSION['username']=$username; header("location: studies.php"); // Redirecting To Studies List } else { $error = "Username or Password is invalid<br>".$err.$response; } } } ?> <html> <head> <title>Login to DFdiscover via DFws</title> <link href="styles.css" rel="stylesheet" type="text/css"> </head> <body> <center> <div id="logo"> <div id="main"><h1>Login</h1> <div id="login" align=left> <form action="" method="post"> <label>DFdiscover Server:</label><input id="server" name="server" type="text"><br> <label>Username:</label><input id="name" name="username" type="text"><br> <label>Password:</label><input id="password" name="password" type="password"><br><br> <input name="submit" type="submit" value=" Login "><br> <span><?php echo $error; ?></span> </form> <a href="https://www.dfdiscover.com">www.dfdiscover.com</a> </center></body> </html>
<?php //////////////API Requests Functions ////////////////////// $API_PORT= "4433"; $API_URL= "https://dfws.dfdiscover.com:".$API_PORT; $SSL_PEM_FILE = "/etc/ssl/certs/ca-bundle.crt"; // REPLACE AS PER YOUR SERVER SSL CERTS DIR // NOTE: FOLLOWING 3 VARIABLES MUST BE REPLACED WITH YOUR UNIQUE CREDENTIALS $API_CLIENT_ID = "<CLIENT_ID>"; // * REPLACE WITH YOUR UNIQUE CLIENT ID $API_CLIENT_PASS = "<CLIENT_PASS>"; // * REPLACE WITH YOUR UNIQUE CLIENT PASS $API_SECRET = "<CLIENT_SECRET>"; // * REPLACE WITH YOUR UNIQUE CLIENT SECRET $API_AUTH = base64_encode($API_CLIENT_ID.":".$API_CLIENT_PASS); //////////////API Requests Functions ////////////////////////////////// //////////// Request to authorize and login ////////////// function login($svr, $uid, $pwd, &$err) { global $SSL_PEM_FILE , $API_PORT, $API_URL, $API_AUTH; $encoded_pwd = base64url_encode($pwd); $json_str = "{ \n\t\"server\": \"".$svr."\",\n\t\"username\": \"".$uid."\",\n\t\"password\": \"".$encoded_pwd."\",\n\t\"sessionDuration\": \"1\"\n}"; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYHOST => 2, CURLOPT_CAINFO => $SSL_PEM_FILE, CURLOPT_PORT => $API_PORT, CURLOPT_URL => $API_URL."/dfws/v5/authorize", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $json_str, CURLOPT_HTTPHEADER => array( "authorization: Basic ".$API_AUTH, "cache-control: no-cache", "content-type: application/json" ), )); $response = curl_exec($curl); $err = curl_error($curl); if (!empty($err)) echo "<BR>CURL Error: ".$err."<BR>"; $server_resp = json_decode($response); curl_close($curl); $session_id=""; if (isset($server_resp->sessionToken)) { $session_id=$server_resp->sessionToken->sessionID; } else if (isset($server_resp->message)) { $err=$server_resp->message; } return $session_id; } function base64url_encode($data) { return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); } function encodeJWT($s_id, $u_r_l) { global $API_SECRET; $payload= array('sessionId' => $s_id, 'url' => $u_r_l); $header = array('alg' => 'HS256', 'typ' => 'JWT'); $segments = array(); $segments[] = base64url_encode(json_encode($header,JSON_UNESCAPED_SLASHES)); $segments[] = base64url_encode(json_encode($payload,JSON_UNESCAPED_SLASHES)); $signing_input = implode('.', $segments); $signature = hash_hmac('sha256', $signing_input, $API_SECRET, true); $segments[] = str_replace('=', '', base64url_encode($signature)); return implode('.', $segments); } function reqDFData($sid, $req_url, &$response, &$err) { global $SSL_PEM_FILE , $API_PORT, $API_URL, $API_CLIENT_ID; $jwt_str = encodeJWT($sid,$req_url); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYHOST => 2, CURLOPT_CAINFO => $SSL_PEM_FILE, CURLOPT_PORT => $API_PORT, CURLOPT_URL => $API_URL.$req_url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "authorization: Bearer ".$jwt_str, "from: ".$API_CLIENT_ID, "cache-control: no-cache" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; return 0; } return 1; } ?>
<?php /////////////// GET & SHOW STUDIES LIST ////////// include('apirequests.php'); session_start(); if ( !isset($_SESSION['username']) || !isset($_SESSION['session_id']) ) { echo '<font color=blue>Session Expired!</font>'; echo '<br><a href="index.php">Click here to Login</a>'; exit; } $username=$_SESSION['username']; $session_id=$_SESSION['session_id']; if (!reqDFData($session_id, "/dfws/v5/studies", $response, $err)) exit; $server_resp = json_decode($response); if (is_object($server_resp) && $server_resp->status) { echo '<font color=blue>'.$server_resp->message.'</font>'; $_SESSION['reason']=$server_resp->message; echo '<br><a href="index.php">Click here to Login</a>'; exit; } ?> <html> <head> <title>DFdiscover Web - Sample</title> <link href="styles.css" rel="stylesheet" type="text/css"> </head> <body> <center> <h2>Studies List</h2> <?php foreach ($server_resp as $val) { if (!is_object($val)) continue; echo '<div class=study><div align=left>'; echo $val->studyId." \t".$val->name; if ($val->disabled) echo '<font class=study_status color=red>Not Available: '.$val->disabledWhy.'</font>'; else if ($val->restricted) echo '<font class=study_status color=red> Restricted: '.$val->restrictedWhy.'</font>'; else echo '<font class=study_status color=green>Available</font>'; echo ' <br>'; } ?> </center> </body> </html>
@import http://fonts.googleapis.com/css?family=Raleway; #main {width:960px;margin:50px auto;font-family:raleway} span {color:red } h2 {background-color:#FEFFED;color:#2E2E2E;text-align:center;border-radius:-10px -10px 0 0;margin:0px 0px;padding:5px} hr {border:0;border-bottom:1px solid #ccc;margin:10px -40px;margin-bottom:30px} #login {width:300px;float:center;border-radius:10px;font-family:raleway;border:2px solid #ccc;padding:10px 40px 25px;margin-top:70px} input[type=text],input[type=password] {width:99.5%;padding:10px;margin-top:8px;border:1px solid #ccc;padding-left:5px;font-size:16px;font-family:raleway} input[type=submit] {width:100%;background-color:#FFBC00;color:#fff;border:2px solid #FFCB00;padding:10px;font-size:20px;cursor:pointer;border-radius:5px;>margin-bottom:15px} .study{width: 700px;float:center;border-radius:2px;font-family:arial;border:1px solid #E5E4E2;padding:10px 20px 8px;color:#483C32;background: -webkit-gradient>(linear, left top, left bottom,from(#f2f2f2), to(#f2f2f2));background: -moz-linear-gradient(top, #F5F5DC, #f2f2f2); } .study_status{width: 50%;float:right;border-radius:1px;font-size:12px;font-family:arialnarrow;padding:2px 3px 1px;} a {text-decoration:none;color:#4863A0;}
This chapter provides detailed information for using and programming with the DFdiscover API (DFws API), as well as details of all supported API endpoints.
There are two important pre-requisites for using the DFws API:
The DFws API is licensed separately from DFdiscover. A valid license with the DFWS feature enabled is required. Contact DF/Net Research, Inc. for licensing information.
A DFws API server must be installed and configured. This chapter references the generic DFws API server that is available at dfws.dfdiscover.com. You may be using your own DFws API service, exposed through your own dfwsApiServer.
dfwsApiServer
To access resources from dfwsApiServer, clients require a base URI (Uniform Resource Identifier). The base URI is the hostname of the dfwsApiServer appended with the service name and the API version. The DFws API supports HTTPS requests only, providing TLS1.2 and TLS1.3 encrypted communications over the exposed port. DFws API clients must also be aware of the correct port number to use for sending HTTPS requests. In our demo example, we use port number 4433. Together with the generic DFws API server, the correct Base URI to send requests is thus:
https://dfws.dfdiscover.com:4433/dfws/v5
Before accessing resources provided by dfwsApiServer, clients must have an API Client Account defined in the DFws database. This is typically requested of and provided by the DFws administrator (which is DF/Net Research, Inc. at this time). The result of that request is a set of API Client Account credentials.
client_id
client_pass
client_secret
To use API resources, it is important to be familiar with DFdiscover. All DFdiscover clients communicate with a DFdiscover server using an encrypted connection. DFdiscover login credentials are required to establish a connection, which are then followed by data transactions. Each DFdiscover user is provided with the hostname of the DFdiscover server to connect to along with a Username and Password (these are normal DFdiscover user credentials, which are different from the API client account credentials). Once users are logged-in to the DFdiscover server using a client application, the application maintains that session for all database queries to DFdiscover. Similarly, all DFws API requests require an authenticated session that must be initialized using the authorize request. This request serves as an entry point for starting any new sessions to a DFdiscover server via the DFws API.
A session is initialized using the authorize request and a session is terminated using the logout request. Creation of a session provides a unique sessionID. All subsequent requests must provide an encoded JWT session token, which includes this sessionID.
logout
The following section outlines details of how to compile requests and tokens. A JWT Token is uniquely generated for each API request using an algorithm provided to clients as part of the application distribution. The algorithm requires a client_secret (or sessionKey), request_URI and the sessionID. For more information regarding JWT see jwt.io and the JWT generation code examples in this document.
sessionKey
request_URI
Each request is sent to the dfwsApiServer using HTTPS syntax and semantics. The Header component includes the API client/session information while the Body contains the JSON data of the request.
The authorize request starts a new DFws API session for a specific DFdiscover server. In the HTTP Header, the Basic Authorization Header is used to send API client credentials as a base64 encoded string based in the format
client_id:client_pass
The Body of the request includes JSON containing the DFdiscover server hostname and user login credentials.
Note that the client_id:client_pass must be Base64 encoded. This is easily accomplished using a standard base64encode function, e.g., base64('client_id:client_pass'); (where client_id and client_pass are concatenated with a colon)
base64('client_id:client_pass');
Assuming a client_id of user1 and a client_pass of x, the base64 encoded result might be ZGZjb2xsZWN0OjFwYXNzd2Q=. That result is then included in the HTTPS request body as follows:
user1
x
ZGZjb2xsZWN0OjFwYXNzd2Q=
POST https://dfws.dfdiscover.com:4433/dfws/v5/authorize HTTP/1.1 Authorization: Basic ZGZjb2xsZWN0OjFwYXNzd2Q= Body: {"server":"s1.dfdiscover.com","username":"user1","password":"x","deviceID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"}
Response to the request includes the unique sessionID. This sessionID is subsequently required for composing session tokens to be used in subsequent requests. The response has the following appearance:
{ "apiVersion": "5.6", "serverResponse": { "authStatus": 1, "cdnUrl": "https://cdn.dfdiscover.com/v5.5", "isRouterUser": true, "isSysAdmin": false, "maxMediaSize": 26214400, "passExpiryDays": 47, "passRules": { "charDigitRequired": true, "minLength": 7, "specialCharRequired": false, "upperLowerRequired": false }, "server": "explore.dfdiscover.com", "serverVersion": "5.6.0", "timestamp": "2022-12-27T23:37:49", "userEmail": "admin@dfdiscover.com", "userFullName": "DFdiscover Admin" }, "sessionToken": { "expiryDate": "2020-05-27T13:40:45Z", "sessionID": "f8fafe62-c01e-4b03-91ca-02cc258cea61" "sessionKey": "k2c01e4b" } }
All requests (except authorize, broadcast and log) must provide
a From header including client_id (and sessionID if using sessionKey for encoding JWT),
From
an Authorization header with the JWT sessionToken in the format Bearer ${jwt_token}.
Authorization
Bearer ${jwt_token}
The HTTP request components for studies request are as follows:
GET /studies HTTP/1.1 Authorization: Bearer ${jwt_token} From: ${client_id}
for example:
GET https://dfws.dfdiscover.com:4433/dfws/v5/studies HTTP/1.1 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiIyMTE2YjM3NS0yOTQxLTQ1ZmEtOGE3NC0x OWEzNTZlMTE0ZWMiLCJ1cmwiOiIvZGZ3ZWJhcGkvdjAvc3R1ZGllcyJ9.yrZJbzubVaG9vfqT19h7fbUfKx7quzzmQ fPjKfbzplQ From: dfcollect
Every API client is required to logout, thereby terminating the sessionID and closing the connection. To terminate an authorized user's session with a DFdiscover server, make a GET request to logout as follows:
GET /logout HTTP/1.1 Authorization: Bearer ${jwt_token} From: ${client_id}
For example,
GET https://dfws.dfdiscover.com:4433/dfws/v5/logout HTTP/1.1 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiJkOTEwNDU3NS1mN2Q2LTQzNDAtYjhlYy00 ODg2YTk1ODBjZjYiLCJ1cmwiOiIvZGZ3cy92NS9sb2dvdXQifQ==.GR/9EKqwhptEHmpeet5J2CGOBupBnYaZB9bG2 16iZZ8 From: dfcollect
GET
PUT
POST
LOCK
UNLOCK
The following resources may be requested.
POST /authorize
GET /logout
GET /studies
GET /studies/:studyNum
GET /studies/:studyNum/visitmap
GET /studies/:studyNum/sites
GET /studies/:studyNum/missingmap
GET /studies/:studyNum/querycategorymap
GET /studies/:studyNum/crftypemap
GET /studies/:studyNum/subjectaliasmap
PUT /studies/:studyNum/subjectaliasmap/usealias?enable
GET /studies/:studyNum/languages
GET /studies/:studyNum/translations
POST /studies/:studyNum/lut/
GET /studies/:studyNum/lut/:lut_name
GET /studies/:studyNum/setup
GET /studies/:studyNum/setup/plates/:plate
GET /studies/:studyNum/setup/plates/:plate/modules/:module_id
GET /studies/:studyNum/editchecks
GET /studies/:studyNum/editchecks/runscript?name={:script_name}
GET /studies/:studyNum/editchecks/runbatch?control={:control_file_name}
GET /studies/:studyNum/reports
GET /studies/:studyNum/reports/:reportname
GET /studies/:studyNum/views/:viewname
GET /studies/:studyNum/permissions
GET /studies/:studyNum/setuppackage
GET /studies/:studyNum/bkgd/:plate
GET /studies/:studyNum/logo
GET /studylogos
GET /studies/:studyNum/rolenames
GET /studies/:studyNum/sitesubjects/:site_id?includenew
GET /studies/:studyNum/sitesubjects/stats/:site_id
GET /studies/:studyNum/subjectkeys/:subject
GET /studies/:studyNum/subjectbinder/:subject
GET /studies/:studyNum/sitekeys/:site_id
GET /studies/:studyNum/keysinfo
GET /studies/:studyNum/records
GET /studies/:studyNum/records/:subject/:visit/:plate
LOCK /studies/:studyNum/records/:subject/:visit/:plate
UNLOCK /studies/:studyNum/records/:subject/:visit/:plate
PUT /studies/:studyNum/records/:subject/:visit/:plate
PUT /studies/:studyNum/records/missed/:subject/:visit/:plate
PUT /studies/:studyNum/records/missed/:subject/:visit
GET /studies/:studyNum/sitequeries/:site_id
POST /studies/:studyNum/queries/mpquery/:subject/:visit/:plate
POST /studies/:studyNum/queries/count
GET /studies/:studyNum/sitereasons/:site_id
POST /studies/:studyNum/reasons/count
GET /studies/:studyNum/tasks
GET /studies/:studyNum/tasks/:task_name
GET /studies/:studyNum/tasks/stats/:task_name
GET /studies/:studyNum/visits/:subject/:plate
GET /studies/:studyNum/visitdate/:subject/:visit
GET /studies/:studyNum/history/records/:subject/:visit/:plate
GET /studies/:studyNum/documents/:image_id
POST /studies/:studyNum/documents/:subject/:visit/:plate
PUT /studies/:studyNum/documents/:subject/:visit/:plate/:image_id?operation=primary
PUT /studies/:studyNum/documents/:subject/:visit/:plate/:image_id?operation=secondary
PUT /studies/:studyNum/documents/:subject/:visit/:plate/:image_id?operation=delete
POST /documents
Get /licensemetrics
GET /featuremetrics
POST /contactinfo/:user_name
POST /password/:user_name
POST /verifypassword/:user_name
POST /resetpassword
GET /users{/:user_name}
GET /users/:user_name/userroles
GET /roles/:studyNum
GET /roles/:role_id/roleperms
POST /mail
POST /broadcast
GET /keepalive
GET /log
GET /closesession
Following is the list of HTTP status codes that may be returned by a DFws API server. For the full list and details of HTTP status codes, see List of HTTP Status Codes, Wikipedia.
200
204
400
401
403
404
409
500
501
503
600
601
602
If the API request does not return with a status of 200, the error is represented as a JSON object with status and error message like this:
{ "status": 403, "message": "Forbidden" }
There are several methods available for generating a JSON web token. Implementation is left to the developer. A few examples are provided here.
JWT Generation in AngularJS
<!-- BEGIN CODE SNIPPET --> function createJWT(uri, sessionId) { let header = { "alg": "HS256", "typ": "JWT" }; let payload = { "sessionId": sessionId, "url": uri }; let secret = 'client_secret'; // Provided to all API clients let b64Header = b64Encode(JSON.stringify(header)); let b64Payload = b64Encode(JSON.stringify(payload)); let b64Secret = b64Encode(secret); return b64Header + '.' + b64Payload + '.' + hmacSHA256(b64Header + "." + b64Payload, b64Secret); } // How to call above function jwt_token = createJWT("/dfws/v5/studies", "2116b375-2941-45fa-8a74-19a356e114ec"); <!-- END CODE SNIPPET -->
JWT Generation function in PHP
<!-- BEGIN CODE SNIPPET --> function create_JWT($uri, $sessionId) { $payload= array('sessionId' => $sessionId, 'url' => $uri); $header = array('alg' => 'HS256', 'typ' => 'JWT'); $segments = array(); $segments[] = base64_encode( json_encode($header,JSON_UNESCAPED_SLASHES)); $segments[] = base64_encode( json_encode($payload,JSON_UNESCAPED_SLASHES)); $signing_input = implode('.', $segments); $signature = hash_hmac('sha256', $signing_input,'client_secret or sessionKey', true); $segments[] = str_replace('=','', base64_encode($signature)); return implode('.', $segments); } // How to call above function $jwt_token = create_JWT('/dfws/v5/studies', '2116b375-2941-45fa-8a74-19a356e114ec'); <!-- END CODE SNIPPET -->
JWT Generation using JWT.IO library (www.jwt.io)
For JWT.IO simply compose payload with 'url' and 'sessionId' and use client_secret (or sessionKey) to generate token.
<!-- Sample Header--> { "alg": "HS256", "typ": "JWT" } <!-- Sample Payload --> { "sessionId": "929e9444-a028-4a94-8931-e2cbdf4b4a1f", "url": "/dfws/v5/studies" }
Authorize a DFdiscover user and start a new session
{ "server": "explore.dfdiscover.com", "username":"datafax", "password":"XXXXXXXX", "deviceID":"XXXXXX-XXXXX-XXXXX-XXXXXX" }
{ "server": "explore.dfdiscover.com", "username":"datafax", "password":"XXXXXXXX", "deviceID":"XXXXXX-XXXXX-XXXXX-XXXXXX", "authCode":"999999", "trustDevice":true }
Each request with 2FA parameters must include login credentials again to verify the authCode or request a new code. Multiple authorize requests will be submitted in a typical 2FA scenario. Successful login is indicated by a JSON response where authStatus has the value 1. Thereafter the SessionID can be used to continue with subsequent requests, as needed for JWT (authorization token).
authCode
authStatus
SessionID
The login session is maintained on the server, so long as requests are received for the session within this interval (expressed in minutes). The default value for sessionDuration is 3 minutes.
sessionDuration
If no requests are received for sessionDuration minutes the API server will close (logout) the session. Any further requests will need to re-login and open a new session. To maintain a session, keepalive requests must be sent by the client at an interval shorter than sessionDuration. To avoid holding server resources, each login should close their session, using the logout request, as soon as possible.
keepalive
If there is no activity and session logout has not occurred, the session will automatically expire once idle for specified sessionDuration interval.
{ "apiVersion": "5.3", "serverResponse": { "authStatus": 1, "cdnUrl": "https://cdn.dfdiscover.com/v5.3", "isRouterUser": true, "isSysAdmin": true, "maxMediaSize": 26214400, "passExpiryDays": 138, "passRules": { "charDigitRequired": true, "minLength": 7, "specialCharRequired": false, "upperLowerRequired": false }, "server": "explore.dfdiscover.com", "serverVersion": "5.3.0", "timestamp": "2020-05-27T23:37:49", "userEmail": "admin@dfdiscover.com", "userFullName": "DFdiscover Admin" }, "sessionToken": { "expiryDate": "2020-05-28T03:40:45Z", "sessionID": "511686ee-7078-488f-be28-508ffc628633" } }
{ "apiVersion": "5.3", "serverResponse": { "authStatus": 2, "timestamp": "2020-05-27T17:06:27" }, "sessionToken": { "expiryDate": "2020-05-27T21:09:28Z", "sessionID": "bf97d557-bd6f-4bc6-82db-5ae9919c5943" } }
Notable parameters in the JSON response are authStatus and sessionID.
Authorization status code from the list:
Send an email using details in the input
{ "results": "OK" }
Retrieve DFlogin.html contents from DFdiscover server.
{ "data": "<center>DFdiscover 2020 Version 5.3 running on OpenSUSE 13.2</center>" }
This is an independent request and does not depend on 'authorize' request. For this reason, the API user must pass the Authorization header.
Provide your client credentials in the Authorization header ("Basic "+ client_id:client_pass) where client_id:client_pass is Base64 encoded.
GET https://dfws.dfdiscover.com:4433/dfws/v5/broadcast HTTP/1.1 Authorization: Basic ZGZjb2xsZWN0OjFwYXNzd2Q=
A connection keep-alive request that resets the session's expiry timer
{ "sessionDuration": 10, "status": "OK" }
Retrieve the most recent 500 records from internal DFws log. Restricted to DFws admins only.
GET https://dfws.dfdiscover.com:4433/dfws/v5/log HTTP/1.1 Authorization: Basic ZGZjb2xsZWN0OjFwYXNzd2Q=
[ { "DFDEVLOGIN": "", "DFMESSAGE": "Invalid Authorization Token", "DFMETHOD": "POST", "DFPEER": "::ffff:192.168.4.105", "DFSTATUS": 200, "DFTIMESTAMP": "20181018193011", "DFTYPE": 1, "DFURI": "/dfws/v5/authorize", "DFUSER": "" }, { "DFDEVLOGIN": "", "DFMESSAGE": "Invalid API call", "DFMETHOD": "POST", "DFPEER": "::ffff:192.168.4.105", "DFSTATUS": 503, "DFTIMESTAMP": "20181018192503", "DFTYPE": 1, "DFURI": "/dfws/v5/authorize", "DFUSER": "" } ]
Retrieve details of current active sessions. This request is restricted to DFdiscover admins or DFws admins. The DFws admin can access sessions list in the following ways: Provide the admin credentials in the Authorization header ("Basic "+ client_id:client_pass) where client_id:client_pass is Base64 encoded.
GET https://dfws.dfdiscover.com:4433/dfws/v5/sessions HTTP/1.1 Authorization: Basic ZGZjb2xsZWN0OjFwYXNzd2Q=
GET /sessions
[ { "apiClient": "dfweb", "datafaxServer": "t52suse.datafax.com", "duration": 3, "expiryTime": "Fri Jul 12 19:57:35 2019 GMT", "hostAddresses": [ { "hostAddress": "::ffff:192.168.4.223", "order": 1 } ], "openedStudy": 154, "origin": "", "sessionID": "c4e6d9f4-7b77-4d88-9455-a16c117179c1", "startTime": "Fri Jul 12 19:54:33 2019 GMT", "status": "idle", "sysAdmin": true, "userID": "datafax" }, { "apiClient": "dfwebadmin", "datafaxServer": "t52centos.datafax.com", "duration": 3, "expiryTime": "Fri Jul 12 19:56:43 2019 GMT", "hostAddresses": [ { "hostAddress": "::ffff:192.168.4.105", "order": 1 } ], "openedStudy": 0, "origin": "", "sessionID": "54d78cf9-604f-48b6-83c7-add7b142ce04", "startTime": "Fri Jul 12 19:52:06 2019 GMT", "status": "idle", "sysAdmin": true, "userID": "datafax" } ]
Close an active DFws session. An authorized DFdiscover admin user session must be initialized by the API client in order to close DFws sessions to the DFdiscover server. Therefore, like all non-admin requests, this request requires JWT token in Authorization header as well as client_id in From header.
GET /closesession?sessionID=${SESSIONID}
{ "logout": true, "timestamp": "2019-07-12T12:11:48", "message": "Session closed successfully" }
Logout (gracefully end) the user's active connection to a DFdiscover server
{ "logout": true, "sessionID": "94e25498-1ea6-401b-80aa-e35ebe1e626d", "username": "datafax" }
Request the list of all permitted studies and their status
[ { "disabled": false, "disabledWhy": "", "name": "Demo 253", "restricted": false, "restrictedWhy": "", "studyId": 253 }, { "disabled": false, "disabledWhy": "", "name": "Acceptance Test Study", "restricted": false, "restrictedWhy": "", "studyId": 254 } ]
Each study is presented as a single element in a JSON array of study elements.. For each study element, the following attributes are provided.
Get the status of a particular study and keep study connection open for the session.
GET /studies/:study_num
{ "readOnly": false, "studyId": 250 }
Release the study opened in current session and return the status of the study.
GET /studies?release
{ "status": true, "studyId": 250 }
Fetch a list of lookup table names, type (global vs study) and last modified timestamps. This request, in the absense of list, is also used to load entire set of lookup tables configurable to fetch only new or modified lookup tables. To get all lookup tables use POST /studies/:study_num/lut request with empty request body. Subsequently, to fetch only new or modified lookup tables include each lookup tables' name and timestamp in the request body (similar JSON array structure as received in response however with only name and timestamp objects).
list
POST /studies/:study_num/lut
name
timestamp
Example Response
Request
Body (optional)
[ { "name": "investigators", "timestamp": "2023-01-10T04:30:21" }, { "name": "QCREPLY", "timestamp": "2020-10-29T19:39:40" } ]
[ { "global": false, "name": "investigators", "timestamp": "2023-01-10T04:30:21" }, { "global": false, "name": "QCREPLY", "timestamp": "2020-10-29T19:39:40" }, { "_remaining": 0, "_total": 1, "descriptions": "Acronym|Result", "global": false, "name": "REASON", "names": "Acronym|Result", "results": "1|Data entry error, now corrected. 2|Confirmed, value is outside the legal range but correct as entered. 3|CRF belongs to Subject nnnnnnn at visit nnn. Data Manager please transfer . 4|Delete CRF. CRF was entered in error. 5|Data changed on paper CRF re-submitted by site. 7|Other, please specify:", "returns": [ 1 ], "search": [ 0 ], "timestamp": "2020-10-29T19:39:40" } ]
POST /studies/:study_num/lut?list
[ { "global": false, "name": "aecodes", "timestamp": "2023-01-21T09:35:15" }, { "global": false, "name": "drugs", "timestamp": "2023-01-20T11:43:33" }, { "global": false, "name": "QCREPLY", "timestamp": "2020-10-29T19:39:40" }, { "global": false, "name": "investigators", "timestamp": "2023-01-10T04:30:21" } ]
Get a named lookup table
GET /studies/:study_num/lut/:lut_name
{ "_remaining": 0, "_total": 1, "descriptions": "Acronym|Result", "global": false, "names": "Acronym|Result", "results": "refax|corrections on refaxed CRF from a clinical site letter|corrections described in a letter from the clinical investigator\ntypo|data entry error correction", "returns": [ 1 ], "search": [ 0 ] }
Get missing values lookup
GET /studies/:study_num/missingmap
[ { "code": ".U", "label": "Unknown" }, { "code": ".D", "label": "Not Done" }, { "code": ".A", "label": "Not Available" }, { "code": ".R", "label": "Not Relevant" } ]
Get query category map
GET /studies/:study_num/querycategorymap
[ { "code": "1", "label": "Missing", "autoResolve": 0, "sortValue": 0 }, { "code": "2", "label": "Illegal", "autoResolve": 1, "sortValue": 0 } ]
Get CRF (background) type map
GET /studies/:study_num/crftypemap
[ { "code": "en", "label": "English" }, { "code": "fr", "label": "French" }, { "code": "fax", "label": "Print Version" } ]
Get supported languages
GET /studies/:study_num/languages
[ "English", "French", "Chinese" ]
Get Translations
GET /studies/:study_num/translations
{ "names": "default|Uses|fr|ru|ua|ch", "results": [ "1 Month||1 Mois|||", "1-2 times/week|||1-2 раза в неделю||", "1. A ge 16-79 years old||1. Âge 16-79 ans|1. Возраст 16-79 лет||", "1. Convenience||||1. Зручність|", "1. Current Total Dose Per Day (mg)||1. Dose totale act uelle par jour (mg)||1. Поточна загальна доза на добу (мг)|", "1. Date of Cha nge||1. Date de changement|1. Дата изменения|1. Дата зміни|", "1. Did pa tient complete entire study?|||||1.患者是否完成了整个研究?", "1. Drug Name|||||1.药品名称", ... "Week Beginning on Sunday|||||", "Weight (kg)|||||", "Weight (lbs)|||||", "Yes|||||" ] }
Get subject alias map
GET /studies/:study_num/subjectaliasmap
GET /studies/:studyNum/subjectaliasmap/subject/:subjectId
GET /studies/:studyNum/subjectaliasmap/alias/:alias
[ { "subjectAlias": "DG-1001", "subjectId": 1001 }, { "subjectAlias": "DG-1002", "subjectId": 1002 }, { "subjectAlias": "C11460-001", "subjectId": 11460001 }, { "subjectAlias": "C11460-002", "subjectId": 11460002 }, { "subjectAlias": "C11460-003", "subjectId": 11460003 }, { "subjectAlias": "0000000000001", "subjectId": 190000000000001 } ]
Enable use of subject aliases instead of subject IDs in all subsequent study data and reports responses.
PUT /studies/:study_num/subjectaliasmap/usealias?enable
When enabled server returns subject aliases (if defined) in all subsequent data requests. Supported parameters are enable and disable. By default this setting is disabled and the subject IDs are used. A successful server response (status 200) is an indication that setting is applied.
enable
disable
{ "useSubjectAlias": "yes" }
Get visit map
GET /studies/:study_num/visitmap
[ { "acronym": "SCR", "addVisit": false, "dueDay": 0, "label": "Screening", "missedVisitPlate": 0, "optionalPlates": [ 102 ], "orderPlates": [ 1, 10, 30, 102 ], "overdueAllowance": 0, "requiredPlates": [ 1, 10, 30 ], "terminationWindow": "", "type": "X", "visitDateField": "0", "visitDatePlate": 0, "visitId": 0, "visitIds": [ { "end": 0, "start": 0 } ] }, { "acronym": "ENR", "addVisit": false, "dueDay": 0, "label": "Enrollment", "missedVisitPlate": 0, "optionalPlates": [ ], "orderPlates": [ 20, 30, 40, 60 ], "overdueAllowance": 0, "requiredPlates": [ 20, 30, 40, 60 ], "terminationWindow": "", "type": "B", "visitDateField": "8", "visitDatePlate": 20, "visitId": 1, "visitIds": [ { "end": 1, "start": 1 } ] } ]
Visit Attributes
For visit type W, a termination window is required and may be one of the following forms:
In each case, the date value uses the format that is defined as the visitDateField's format
Defines visit ids (start-end, inclusive) for visits that occur multiple times. The client often handles this in the following manner:
Fill out form or group of forms for the first visit id in the range
Once that form is assigned a status, a new visit with the next id defined in the range appears
Visit Codes
Get reports list and details
GET /studies/:study_num/reports
DFdiscover Reports are strucuted based on categories.
{ "DFdiscoverReports": [ { "name": "Site Tracking", "reports": [ { "cmd": "cmd=getreport&name=enrollment", "css": "https://cdn.dfdiscover.com/v5.5/css/DF_ReportStyles.css", "js": "https://cdn.dfdiscover.com/v5.5/js/DF_Enrollment.min.js", "name": "DF_Enrollment", "options": ["-visit <#> ...Use the specified visit as the enrollment visit", "-plate <#> ...Use the specified plate as the enrollment plate" ], "title": "Enrollment by Site" }, { "cmd": "cmd=getreport&name=sitevisits", "css": "https://cdn.dfdiscover.com/v5.5/css/DF_ReportStyles.css", "js": "https://cdn.dfdiscover.com/v5.5/js/DF_STvisits.min.js", "name": "DF_SiteVisits", "title": "Visits by Site" }, { "cmd": "cmd=getreport&name=sitecrfs", "css": "https://cdn.dfdiscover.com/v5.5/css/DF_ReportStyles.css", "js": "https://cdn.dfdiscover.com/v5.5/js/DF_STcrfs.min.js", "name": "DF_SiteCRFs", "title": "CRFs by Site" }, { "cmd": "cmd=getreport&name=siteqcs", "css": "https://cdn.dfdiscover.com/v5.5/css/DF_ReportStyles.css", "js": "https://cdn.dfdiscover.com/v5.5/js/DF_STqueries.min.js", "name": "DF_SiteQueries", "title": "Queries by Site" }, { "cmd": "cmd=getreport&list=DF_SiteSubjects", "css": "https://cdn.dfdiscover.com/v5.5/css/DF_ReportStyles.css", "js": "https://cdn.dfdiscover.com/v5.5/js/DF_TLlist.min.js", "name": "DF_SiteSubjects", "options": [ "-site <#> ...Use the specified site", "-unused <#> ...Unused subjects", "-enrolled ...Enrolled subjects", "-complete ...Complete to date subjects", "-incomplete ...Incomplete to date subjects" ], "title": "Site Subject Status" } ], "title": "" }, { "name": "Subject Tracking", "reports": [ ... ], "title": "" }, { "name": "Subject Scheduling", "reports": [ ...], "title": "" }, { "name": "Query Reporting", "reports": [ ... ], "title": "" }, { "name": "Study Setup", "reports": [ ... ], "title": "" }, { "name": "Database Status", "reports": [...], "title": "" }, { "name": "Query and Data Trending", "reports": [ ...], "title": "" }, { "name": "Tabular Listing", "reports": [ ... ], "title": "" }, { "name": "Task Listing", "reports": [ ... ], "title": "" } ] }
Run study report and return JSON results
GET /studies/:study_num/reports/:reportname
Each response has a context section, optional labels section and a results section
[ { "context": { "args": { }, "endTime": "2018-04-16T15:06:46.552 UTC-04:00", "reportName": "Enrollment by Site", "startTime": "2018-04-16T15:06:46.454 UTC-04:00", "studyId": 154, "studyName": "Generic 154" }, "labels": { "country":"Country Code", "endDate":"End Date", "enroll":"Enrollment Target", "name":"Site Name", "siteId":"Site ID", "startDate":"Start Date" }, "results":[{ ... }] } ]
Returns Tabular Listing view based on :viewname for the specified study. The reports request includes list of Tabular Listing view reports which are specified here as :viewname to get the Tabular Listing View results
reports
GET /studies/:study_num/views/:viewname
Each response has a context, description, hiddenFields,keyFields, names, sort and results sections
{ "_remaining": 0, "_total": 12, "context": { "args": {}, "endTime": "2022-07-26T14:34:51.768", "reportName": "FirstView", "startTime": "2022-07-26T14:34:51.765", "studyId": 17, "studyName": "DFUG 17" }, "descriptions": "DFSTUDY_NUMBER|DFSITE_ID|DFSUBJECT_ID|DFSUBJECT_ALIAS|3:Birth Date|3:Sex|3:Ethnicity|1:Visit Date| 2:Met Eligibility Criteria|visit|plate", "hiddenFields": [ 9, 10 ], "keyFields": { "category": "", "field": "", "plate": "10", "site": "1", "subject": "2", "subjectAlias": "3", "type": "data", "visit": "9" }, "names": "DFSTUDY_NUMBER|DFSITE_ID|DFSUBJECT_ID|DFSUBJECT_ALIAS|3:BRTHDAT|3:SEX|3:ETHNIC|1:VISDAT|2:IEYN|visit|plate", "results": [ "17|1|1001|||F|blank|2019-09-11|Y|1|3", "17|1|1002||1989-06-15|M|NA|Cant Recal|N|1|3", "17|1|100 3||1971-01-11|blank|NOT HISPANIC OR LATINO|2018-09-20|Y|1|3", "17|1|1005|||F|blank|11/NOV/2019|Y|1|3", "17|1|1009|||M|blank||Y|1|3", "17|1|1015|||F|blank||...|1|3", "17|1|1028|||blank|blank||...|1|3", "17|1|1030|||blank|blank||...|1|3", "17|2|2001|||F|blank|2019-08-21|N|1|3", "17|2|2003|||M|blank|2020-05-28|N|1|3", "17|2|2010|||F|blank||...|1|3", "17|2|2011|||F|blank||Y|1|3" ], "sort": { "ascending": true, "field": "2" } }
Get site information for an entire study definition
GET /studies/:study_num/sites
[ { "name": "Hospital #1", "siteId": 10, "contact": "Person #1", "email": "test@dfnetresearch.com", "investigator": "PI #1", "investigatorPhone": "", "address": "100 Main St., Hamilton, Ontario", "telephone": "905-522-3282", "subjects": [ { "end": 10999, "start": 10001 } ] }, { "name": "Hospital #2", "siteId": 20, "contact": "Person #2", "email": "test@dfnetresearch.com", "investigator": "PI #2", "investigatorPhone": "", "address": "15 North St., Hamilton, Ontario", "telephone": "905-522-7284", "subjects": [ { "end": 20999, "start": 20001 } ] } ]
Returns sites database with details, including subject ID ranges, for each site. For each such site, the following attributes are provided.
Get setup information for an entire study definition
GET /studies/:study_num/setup
Accept-Language: {language name}
[ { "addPidEnabled": true, "autoReason": "per field", "dateRounding": "None", "level": 1, "levels": [], "multipleQC": false, "name": "Acceptance Test Study", "number": 254, "pidCount": 5, "plates": [ ... ], "startYear": 1990, "studyHelp": "", "uniqueFieldNames": false, "viewModeEc": false, "yearCutoff": 1920 } ]
The plates content is an array of 0 or more plates, each of which has a structure defined in Setup Plate.
plates
Get setup information for a specific plate
GET /studies/:study_num/setup/plates/:plate
[ { "arrivalTrigger": "", "description": "Blood Pressure Screening Visits", "eCRF": false, "eligibleForSigning": "Final", "help": "", "icr": "Standard", "moduleRefs": [ ... ], "number": 1, "sequenceCoded": "First Data Field", "termPlate": false } ]
The moduleRefs content is an array of 0 or more modules, each of which has a structure defined in Setup Module.
moduleRefs
Get module reference object for a particular plate
GET /studies/:study_num/setup/plates/:plate/modules/:mid
[ { "description": "Blood Pressure Readings", "fieldRefs": [ ... ], "id": 5030, "instance": 2, "moduleId": 5022, "name": "BloodPressure", "number": 4 } ]
The fieldRefs content is an array of 0 or more fields, each of which has a structure defined in Setup Fields.
fieldRefs
Get collection of field reference objects within a module for a particular plate
GET /studies/ :study_num/setup/plates/:plate/modules/:mid/fields/:fid
[ { "alias": "S2SBP1", "blinded": "No", "comment": "", "constant": false, "constantValue": "", "description": "Screen 2: Reading 1 systolic", "display": 3, "fieldEnter": "", "fieldExit": "MissingQC", "fieldId": 10159, "format": "nnn", "help": "Legal values are: $(legal)", "id": 10207, "legal": "60-300", "level": 0, "name": "SBP1", "number": 21, "onCrfRect": true, "plateEnter": "", "plateExit": "", "prompt": "", "reasonIfNonBlank": false, "rects": [ { "h": 25, "w": 26, "x": 501, "y": 475 } ], "required": "Optional", "skipCondition": "", "skipTo": 0, "store": 3, "type": "Number", "units": "mmHg", "use": "Standard" } ]
Get study permissions for DFcollect offline
GET /studies/:study_num/permissions
[ { "addQuery": false, "addReason": true, "approveQuery": true, "approveReason": false, "attachDoc": true, "createData": true, "deleteData": true, "deleteQuery": false, "deleteReason": true, "ecAddQuery": true, "ecAddReason": true, "ecApproveReason": true, "ecDeleteQuery": true, "ecModifyData": true, "ecModifyQuery": true, "getLevels": "1-2", "internalQuery": "showAll", "missed": false, "modifyData": true, "modifyLevels": "1-7", "modifyQuery": false, "modifyReason": true, "needPassword": true, "plates": "7", "replyQuery": true, "roleId": 68, "roleName": "Get level restriction", "showBlindedFields": false, "showInternalQueries": false, "sites": "3-99", "subjects": "*", "visits": "*", "writeLevels": "1-2" }, { "addQuery": false, "addReason": false, "approveQuery": false, "approveReason": false, "attachDoc": true, "createData": false, "deleteData": false, "deleteQuery": false, "deleteReason": false, "ecAddQuery": false, "ecAddReason": false, "ecApproveReason": false, "ecDeleteQuery": false, "ecModifyData": false, "ecModifyQuery": false, "getLevels": "1-7", "internalQuery": "showAll", "missed": false, "modifyData": false, "modifyLevels": "", "modifyQuery": false, "modifyReason": false, "needPassword": false, "plates": "8-499", "replyQuery": false, "roleId": 68, "roleName": "Get level restriction", "showBlindedFields": false, "showInternalQueries": false, "sites": "3-99", "subjects": "*", "visits": "21-99", "writeLevels": "" } ]
The 'permissions' object is included in Setup Package.
Get study setup definition and some study configurations which include sites, visit map, page map, missing values map, permissions for DFcollect offline, query category map and editchecks binary for study :study_num.
GET /studies/:study_num/setuppackage
[ { "centers": [{...}], "editchecks": "", "missingmap": [{...}], "pagemap": [...], "qcproblemmap": [{...}], "permissions": [{...}], "setup": {...} "visitmap": {...} } ]
The contents for each of the setup package component are described under the individual requests. Note that 'centers' is synonym for 'sites' and 'qcproblemmap' is synonym for 'querycategorymap'.
Get edit checks binary (compiled editchecks)
GET /studies/:study_num/editchecks
Execute scripts for edit checks
GET /studies/:study_num/editchecks/runscript?name= {:script_name}¶m={:script_parameters}
Execute edit checks script named :script_name (this is a required parameter) which may itself require :script_parameters
Returns base64 encoded results
{ "results": "TW9uIE9jdCA3IDA5OjMxOjQ3IEVEVCAyMDE5Cg==" }
Execute batch edit checks
GET /studies/:study_num/editchecks/runbatch?control= {:control_file_name}[&output=xml|html|none]
Execute batch edit checks using the control file named :control_file_name (this is a required parameter). The output parameter is optional to have results returned in xml or html (default) format. Specifying none as output will simply return the status without the results.
output
xml
html
none
{ "control": "Test_Control_File", "format": "html", "results": [ { "data": " ... ", "name": "New_Batch" } ] }
Get study logo image, base64 encoded
GET /studies/:study_num/logo
Get study logo image for all studies, base64 encoded
{ "data": "iVBORw0KGgoAAAANSUh...", "name": "61", "timestamp": "2020-08-05T18:36:21" }
Returns study logos for all studies there is access to with the current user credentials. If there is no study logo, the data attribute is empty.
Get plate background (CRF) image, base64 encoded
GET /studies/:study_num/ bkgd/:plate?visit={:visit}&type={:crftype}&hdimage
Optional parameters visit, type and hdimage can be specified to get specific plate background image
Get list of all roles names for the current user. Filtered by subject id or keys (subject, visit, plate)
GET /studies/:study_num/rolename s?id=:subject_id&visit=:visit_num&plate=:plate_num
All parameters are optional, but in three forms: no parameter, specific subject, or specific key [subject, visit, plate].
[ "datafax permissions", "read only" ]
Get list of all subjects for the specified site that have records in the database
GET /studies/:study_num/sitesubjects/:site_id
site_id is a required integer, equal to the siteId in the sites database
[ { "subjectId": 1001, "status": 1 }, { "subjectId": 1002, "status": 2 }, { "subjectId": 1003, "status": 2 } ]
Returns summary detail, specifically status, for each subject at the requested site. Subjects are included only if they have at least one record in the study database.
Get list of all subjects for the specified site that have records in the database. This request will generate the same results as executing DF_SiteSubjects report, however, the report permission is not required for this request.
GET /studies/:study_num/sitesubjects/stats/:site_id
[ { "_remaining": 0, "_total": 9, "context": { "args": { "complete": "", "incomplete": "", "site": "2" }, "endTime": "2022-12-30T12:47:55.528", "reportName": "DF_SiteSubjects", "startTime": "2022-12-30T12:47:55.525", "studyId": 17, "studyName": "DFUG 17" }, "descriptions": "Site|Subject|Status", "names": "Site|Subject|Status", "results": [ "2|2001|incomplete", "2|2003|incomplete", "2|2005|incomplete", "2|2008|incomplete", "2|2009|incomplete", "2|2010|incomplete", "2|2011|incomplete", "2|2012|incomplete", "2|2013|incomplete" ] } ]
Get list of all existing record keys (subject, visit, plate, status, and validation level) for a given subject
GET /studies/:study_num/subjectkeys/:subjectId
The unique subject ID, :subjectId, is required
[ { "level": 0, "plate": 1, "status": 1, "subjectId": 99001, "visit": 0 }, { "level": 0, "plate": 2, "status": 1, "subjectId": 99001, "visit": 1 } ]
The return result is a JSON array of record key objects with the following attributes.
Get subject binder, based on the visit map (DFvisit_map) for a given subject, in the database for the specified study. Optionally consider conditional plates (DFcplate_map), visits (DFcvisit_map) and terminations (DFcterm_map) when constructing the subject binder, and optionally provide the same output as the Cycle Visits report.
DFvisit_map
DFcplate_map
DFcvisit_map
DFcterm_map
GET /studies/:study_num/subjectbinder/ :subjectId?eval_conditions&cyclevisits
The unique subject ID, :subjectId, is required.
Optionally, evaluate conditions using eval_conditions parameter and provide results in the format of the Cycle Visits report using the cyclevisits parameter.
eval_conditions
cyclevisits
{ "status": 1, "subjectId": 4016, "visits": [ { "label": "Enrollment", "need": 1, "plates": [ { "label": "Subject Visit", "level": 1, "need": 1, "plate": 1, "status": 1 }, { "label": "Eligibility", "level": 0, "need": 1, "plate": 2, "status": 0 }, { "label": "Demographics", "level": 0, "need": 1, "plate": 3, "status": 0 }, { "label": "Lab Results", "level": 0, "need": 1, "plate": 4, "status": 0 }, { "label": "Study Drug Exposure", "level": 0, "need": 1, "plate": 5, "status": 0 }, { "label": "Pain Questionnaire", "level": 0, "need": 1, "plate": 6, "status": 0 } ], "status": 1, "visit": 1 }, { "label": "1 Week Visit", "need": 1, "plates": [ { "label": "Subject Visit", "level": 0, "need": 1, "plate": 1, "status": 0 }, { "label": "Lab Results", "level": 0, "need": 1, "plate": 4, "status": 0 }, { "label": "Study Drug Exposure", "level": 0, "need": 1, "plate": 5, "status": 0 }, { "label": "Pain Questionnaire", "level": 0, "need": 1, "plate": 6, "status": 0 } ], "status": 0, "visit": 2 }, { "label": "2 Week Visit", "need": 1, "plates": [ { "label": "Subject Visit", "level": 0, "need": 1, "plate": 1, "status": 0 }, { "label": "Lab Results", "level": 0, "need": 1, "plate": 4, "status": 0 }, { "label": "Study Drug Exposure", "level": 0, "need": 1, "plate": 5, "status": 0 }, { "label": "Pain Questionnaire", "level": 0, "need": 1, "plate": 6, "status": 0 } ], "status": 0, "visit": 3 }, { "label": "Medical History #01", "need": 0, "plates": [ { "label": "Medical History", "level": 0, "need": 1, "plate": 10, "status": 0 } ], "status": 0, "visit": 101 }, { "label": "Adverse Events #01", "need": 0, "plates": [ { "label": "Adverse Event", "level": 0, "need": 1, "plate": 30, "status": 0 } ], "status": 0, "visit": 301 } ] }
The return result is a JSON object with the following attributes.
Visit array includes JSON objects with the following attributes.
Plates array includes JSON objects with the following attributes.
Get list of all primary keys that exist for a given site
GET /studies/:study_num/sitekeys/:site_id
[ { "subjectId": 999001, "plate": 12, "visit": 50 }, { "subjectId": 999002, "plate": 12, "visit": 50 } ]
Get ONE primary key (status: 0, 1, 2, 3) object, and zero or more secondary images keys (status: 4, 5, 6).
GET /studies/:study_num/keysinfo/:subject/:visit/:plate
the :subject, :visit and :plate are all integer values and required
[ { "arrival":"", "created":"2014-06-25T11:58:10", "firstArrival":"2018/09/20 15:14:42", "format":"", "lastArrival":"2018/09/20 15:14:42", "level":1, "modified":"2018-08-29T16:03:00", "pages":"0", "plate":2, "raster":"1426R0003008", "sender":"", "status":5, "subjectId":2002, "visit":1, "visitDate":"02/01/15" }, { "arrival":"2018/09/20 15:14:42", "created":"2014-06-25T11:58:10", "firstArrival":"2018/09/20 15:14:42", "format":"png", "lastArrival":"2018/09/20 15:14:42", "level":1, "modified":"2018-09-24T11:16:40", "pages":"1", "plate":2, "raster":"1838/009Z001", "sender":"DFws Attach DOC:datafax:asset.PNG%3Fid=7148A4A5-888D-49AC-9781-BC39DA88299E&ext=PNG", "status":2, "subjectId":2002, "visit":1, "visitDate":"02/01/15" } ]
For better performance load study setup, sites, missingmap and visitmap:
/studies/:study_num/setup
/studies/:study_num/sites
/studies/:study_num/missingmap
/studies/:study_num/visitmap
Returns a record with filters for subjectId (id) or site. Records can also be filtered by modified_since timestamp to retrieve records modified on or after a given timestamp.
GET /studies/:study_num/records?id={ subject_id}&site={site_id}&modified_since={timestamp}
the :subject_id, :site_id are integer values
modified_since is an optional ISO format timestamp (i.e. 2016-06-07, 2016-06-07T10:35:57). If this filter is provided, a site_id or subject_id parameter must be specified. This filter retrieves records that were modified on or after the given timestamp.
[ { "created": "2018-09-12T17:32:36", "level": 1, "modified": "2018-12-11T12:56:20", "moduleData": [ { "fieldData": [ { "alias": "VISITNUM001", "fid": 11155, "fieldId": 10488, "missingValue": "", "name": "VISITNUM", "value": "001" }, { "alias": "SUBJID001", "fid": 11154, "fieldId": 10485, "missingValue": "", "name": "SUBJID", "value": "1001" }, { "alias": "VISDAT001", "fid": 11156, "fieldId": 10486, "missingValue": "", "name": "VISDAT", "value": "29-AUG-2018" }, { "alias": "MHYN001", "fid": 11159, "fieldId": 11150, "missingValue": "", "name": "MHYN", "value": "2" }, { "alias": "MHSPID001", "fid": 11160, "fieldId": 11153, "missingValue": "", "name": "MHSPID", "value": "" }, { "alias": "CMYN001", "fid": 11157, "fieldId": 11149, "missingValue": "", "name": "CMYN", "value": "2" }, { "alias": "CMSPID001", "fid": 11158, "fieldId": 11152, "missingValue": "", "name": "CMSPID", "value": "" }, { "alias": "AEYN001", "fid": 11161, "fieldId": 11148, "missingValue": "", "name": "AEYN", "value": "2" }, { "alias": "AESPID001", "fid": 11162, "fieldId": 11151, "missingValue": "", "name": "AESPID", "value": "" }, { "alias": "LBYN001", "fid": 11254, "fieldId": 11243, "missingValue": "", "name": "LBYN", "value": "0" } ], "mid": 5153, "moduleId": 5026 } ], "permission": { "addQuery": true, "addReason": true, "approveQuery": true, "approveReason": true, "attachDoc": true, "createData": true, "deleteData": true, "deleteQuery": true, "deleteReason": true, "ecAddQuery": true, "ecAddReason": true, "ecApproveReason": true, "ecDeleteQuery": true, "ecModifyQuery": true, "internalQuery": "showAll", "modifyData": true, "modifyQuery": true, "modifyReason": true, "replyQuery": true, "roleName": "unrestricted", "showHiddenField": true }, "plate": 1, "raster": "1837R0007001", "screen": 1, "status": 1, "studyId": 17, "subjectId": 1001, "visit": 1 }, { "created": "2018-09-12T17:32:49", "level": 1, "modified": "2018-09-12T17:32:49", "moduleData": [ { "fieldData": [ { "alias": "SUBJID002", "fid": 10617, "fieldId": 10485, "missingValue": "", "name": "SUBJID", "value": "1001" } ], "mid": 5033, "moduleId": 5026 }, { "fieldData": [ { "alias": "IEYN", "fid": 10619, "fieldId": 10382, "missingValue": "", "name": "IEYN", "value": "1" } ], "mid": 5034, "moduleId": 5015 } ], "permission": { "addQuery": true, "addReason": true, "approveQuery": true, "approveReason": true, "attachDoc": true, "createData": true, "deleteData": true, "deleteQuery": true, "deleteReason": true, "ecAddQuery": true, "ecAddReason": true, "ecApproveReason": true, "ecDeleteQuery": true, "ecModifyQuery": true, "internalQuery": "showAll", "modifyData": true, "modifyQuery": true, "modifyReason": true, "replyQuery": true, "roleName": "unrestricted", "showHiddenField": true }, "plate": 2, "raster": "1837R0007002", "screen": 2, "status": 2, "studyId": 17, "subjectId": 1001, "visit": 1 } ]
Get a record with the given set of keys - subject, visit and plate
GET /studies/:study_num/records/:subject/:visit/:plate?allfields
Optional parameter allfields can be specified for new records which retrieves new record with all plate fields, including those that have no associated value
{ "created": "", "level": 0, "modified": "", "moduleData": [ { "fieldData": [ { "alias": "VISITNUM001", "fid": 11155, "fieldId": 10488, "missingValue": "", "name": "VISITNUM", "value": "1" }, { "alias": "SUBJID001", "fid": 11154, "fieldId": 10485, "missingValue": "", "name": "SUBJID", "value": "2001" }, { "alias": "VISDAT001", "fid": 11156, "fieldId": 10486, "missingValue": "", "name": "VISDAT", "value": "" }, { "alias": "MHYN001", "fid": 11159, "fieldId": 11150, "missingValue": "", "name": "MHYN", "value": "0" }, { "alias": "MHSPID001", "fid": 11160, "fieldId": 11153, "missingValue": "", "name": "MHSPID", "value": "" }, { "alias": "CMYN001", "fid": 11157, "fieldId": 11149, "missingValue": "", "name": "CMYN", "value": "0" }, { "alias": "CMSPID001", "fid": 11158, "fieldId": 11152, "missingValue": "", "name": "CMSPID", "value": "" }, { "alias": "AEYN001", "fid": 11161, "fieldId": 11148, "missingValue": "", "name": "AEYN", "value": "0" }, { "alias": "AESPID001", "fid": 11162, "fieldId": 11151, "missingValue": "", "name": "AESPID", "value": "" }, { "alias": "LBYN001", "fid": 11254, "fieldId": 11243, "missingValue": "", "name": "LBYN", "value": "0" } ], "mid": 5153, "moduleId": 5026 } ], "permission": { "addQuery": true, "addReason": true, "approveQuery": true, "approveReason": true, "attachDoc": true, "createData": true, "deleteData": true, "deleteQuery": true, "deleteReason": true, "ecAddQuery": true, "ecAddReason": true, "ecApproveReason": true, "ecDeleteQuery": true, "ecModifyQuery": true, "internalQuery": "showAll", "modifyData": true, "modifyQuery": true, "modifyReason": true, "replyQuery": true, "roleName": "unrestricted", "showHiddenField": true }, "plate": 1, "raster": "0000/0000000", "screen": 0, "status": 0, "studyId": 17, "subjectId": 2001, "visit": 1 }
Get a record referenced by field name for the given set of keys - subject, visit and plate
GET /studies/:study_num/recordsbyname/:subject/:visit/:plate?allfields
This request offers a simplified version of JSON record with only fields name and value pair, offering a simplified format to get and update records for only those fields which are modified. Optional parameter allfields can be specified for new records which retrieves new record with all plate fields.
allfields
{ "created": "2018-09-12T17:32:36", "level": 1, "modified": "2018-12-19T22:18:34", "moduleData": [ { "fieldData": [ { "name": "VISITNUM", "value": "001" }, { "name": "SUBJID", "value": "1001" }, { "name": "VISDAT", "reasons": [ { "code": "", "created": "2018-12-19T21:46:51", "createdBy": "datafax", "field": 7, "level": 1, "modified": "2018-12-19T21:46:51", "modifiedBy": "datafax", "plate": 1, "raster": "0000/0000000", "status": 1, "studyId": 17, "subjectId": 1001, "text": "Set by DFws Import", "visit": 1 } ], "value": "" }, { "name": "MHYN", "value": "" }, { "name": "MHSPID", "value": "" }, { "name": "CMYN", "value": "" }, { "name": "CMSPID", "value": "" }, { "name": "AEYN", "value": "" }, { "name": "AESPID", "value": "" }, { "name": "LBYN", "value": "" } ], "instance": 1, "name": "Common" } ], "permission": { "addQuery": true, "addReason": true, "approveQuery": true, "approveReason": true, "attachDoc": true, "createData": true, "deleteData": true, "deleteQuery": true, "deleteReason": true, "ecAddQuery": true, "ecAddReason": true, "ecApproveReason": true, "ecDeleteQuery": true, "ecModifyQuery": true, "internalQuery": "showAll", "modifyData": true, "modifyQuery": true, "modifyReason": true, "replyQuery": true, "roleName": "unrestricted", "showHiddenField": true }, "plate": 1, "raster": "1837R0007001", "screen": 1, "status": 1, "studyId": 17, "subjectId": 1001, "visit": 1 }
Release lock on data record with the given set of keys - subject, visit and plate
or
GET /studies/:studyNum/unlockrecord/:subject/:visit/:plate
{ "subjectId": 99002, "plate": 1, "status": "OK", "visit": 0 }
Acquire lock on data record with the given set of keys - subject, visit and plate
GET /studies/:studyNum/lockrecord/:subject/:visit/:plate
Add or update a database record for the given set of keys - subject, visit and plate
PUT /studies/:study_num/records/:subject/:visit/:plate{?esignature}{&utc}
PUT /studies/:study_num/recordsbyname/:subject/:visit/:plate{?esignature}{&utc}
For better performance the following requests can be called before GET/POST/PUT records:
in any order. If error occurs in retrieving setup, sites and visit map, records cannot be retrieved, created or modified. Also retrieve missingmap, querycategorymap and lut/reason if specified in setup.
To POST/PUT record updates, first optionally retrieve the record to get the latest record: GET /studies/:study_num/records/:subjectId/:visit/:plate
GET /studies/:study_num/records/:subjectId/:visit/:plate
GET /studies/:study_num/recordsbyname/:subjectId/:visit/:plate
And then to save the record:
POST/PUT /studies/:study_num/records/:subjectId/:visit/:plate
POST/PUT /studies/:study_num/recordsbyname/:subjectId/:visit/:plate
If the optional parameter utc is provided, the timestamps in the submitted data are interpreted as being in UTC. The database server will then update the time to server time.
utc
When saving records with esignatures ensure the optional parameter esignature is specified. Esignature eligible record will update the esignature fields with user's signatures and server date and time stamps. On the other hand, previously e-signed record updated without this parameter will have esignatures fields cleared.
esignature
created
modified
moduleData
subjectId
permission
plate
raster
rasterlist
screen
status
studyId
level
visit
fieldData
mid
moduleId
alias
fid
fieldId
queries
reasons
value
missingValue
category
createdBy
field
modifiedBy
note
page
query
replied
repliedBy
reply
report
resolved
siteId
type
use
code
text
Example POST Request Body
Content-Type: application/json { "subjectId": 1234, "visit": 50, "plate": 10, "status": 1, "moduleData": [ { "mid": "111", "instance": "4", "moduleId": "124", "fieldData": [ { "fid": "1245", "fieldId": 1482, "alias": "helloworld", "value": "myanswer", "queries": [ { "status": 1, "category": "22", "query": "this is a query", "use": 1, "type": 1, "value": "myanswer" } ], "reasons": [ { "status": 3, "text": "this is a reason for data change" } ] } ] } ] }
Example POST/PUT Response
{ "created": "2009-04-15T15:08:58", "modified": "2016-08-25T21:13:55", "subjectId": 1234, "plate": 10, "status": 1, "study": 254, "level": 1, "visit": 50, "problemFields": [ { "fid": 10196, "problem": "Query discarded: invalid query 'type'", "valueToSave": "0" }, { "fid": 10197, "problem": "Invalid Check/Choice code", "valueSaved": "0", "valueToSave": "9" }, { "fid": 10200, "problem": "Decimal dropped", "valueSaved": "060", "valueToSave": "060.999" }, { "fid": 10204, "problem": "Value too large", "valueSaved": "", "valueToSave": "0987654" }, { "fid": 10213, "problem": "Invalid format", "valueSaved": "", "valueToSave": "05/03" } ] }
Example GET Response
{ "created": "2016-07-20T15:15:03", "modified": "2016-07-20T15:15:03", "moduleData": [ { "fieldData": [ { "alias": "SBP1", "fid": 10382, "fieldId": 10159, "queries": [ { "siteId": 99, "created": "2016-07-20T15:15:03", "createdBy": "datafax", "field": 9, "modified": "2016-07-20T15:21:55", "modifiedBy": "datafax", "name": "", "note": "", "page": "0", "subjectId": 99001, "plate": 5, "category": 1, "query": "", "raster": "0000/0000000", "replied": "", "repliedBy": "", "reply": "", "report": "000000", "resolved": "", "resolvedBy": "", "status": 1, "study": 254, "type": 1, "use": 1, "level": 1, "value": "", "visit": 21 } ], "reasons": [ { "code": "", "created": "2016-07-20T15:04:50", "createdBy": "datafax", "field": 9, "modified": "2016-07-20T15:04:50", "modifiedBy": "datafax", "subjectId": 99001, "plate": 5, "raster": "0000/0000000", "status": 1, "study": 254, "text": "This is another test.", "level": 1, "visit": 21 } ], "missingValue": "", "value": "169" } ], "subjectId": 99001, "plate": 5, "raster": "1703/0001001", "rasterList": [ { "fileName": "", "format": "png", "page": "1/1", "raster": "1526/0001001", "arrival": "2015-06-30T18:00:12", "sender": "iDataFax Import PDF:datafax", "status": "secondary" }, { "fileName": "", "format": "mp4", "page": "1/1", "raster": "1633/0001001", "arrival": "2016-08-12T18:03:37", "sender": "iDataFax Attach DOC:datafax", "status": "secondary" }, { "fileName": "dicom_dict.pdf", "format": "png", "page": "1/2", "raster": "1703/0001001", "arrival": "2017-01-19T19:22:33", "sender": "iDataFax Submit PDF:datafax", "status": "primary" }, { "fileName": "dicom_dict.pdf", "format": "png", "page": "2/2", "raster": "1703/0001002", "arrival": "2017-01-19T19:22:33", "sender": "iDataFax Submit PDF:datafax", "status": "secondary" } ], "screen": 2, "status": 2, "study": 254, "level": 0, "visit": 21, "permission": { "addQuery": true, "addReason": true, "approveQuery": true, "approveReason": true, "attachDoc": true, "createData": true, "deleteData": true, "deleteQuery": true, "deleteReason": true, "ecAddQuery": true, "ecAddReason": true, "ecApproveReason": true, "ecDeleteQuery": true, "ecModifyQuery": true, "internalQuery": "showAll", "modifyData": true, "modifyQuery": true, "modifyReason": true, "replyQuery": true, "roleName": "wide open", "showHiddenField": true } }
Example POST/PUT Request Body for recordsbyname (records by field name)
{ "moduleData": [ { "fieldData": [ { "name": "VISDAT", "value": "12-DEC-2018" } ], "instance": 1, "name": "Common" } ], "plate": 1, "status": 1, "studyId": 17, "subjectId": 1001, "visit": 1 }
Example POST/PUT Response for recordsbyname (records by field name)
{ "created": "2018-09-12T17:32:36", "level": 1, "modified": "2019-01-04T12:13:40", "plate": 1, "problemFields": [ { "fid": 11156, "mid": 5153, "name": "VISDAT", "problem": "Value altered", "valueSaved": "12-DEC-2018", "valueToSave": "12-Dec-2018" } ], "status": 1, "studyId": 17, "subjectId": 1001, "visit": 1 }
Example GET Response for recordsbyname (records by field name)
{ "created": "2018-09-12T17:32:36", "level": 1, "modified": "2019-01-02T12:44:43", "moduleData": [ { "fieldData": [ { "name": "VISITNUM", "value": "001" }, { "name": "SUBJID", "value": "1001" }, { "name": "VISDAT", "reasons": [ { "code": "", "created": "2018-12-19T21:46:51", "createdBy": "datafax", "field": 7, "level": 1, "modified": "2018-12-19T21:46:51", "modifiedBy": "datafax", "plate": 1, "raster": "0000/0000000", "status": 1, "studyId": 17, "subjectId": 1001, "text": "Set by DFws Import", "visit": 1 } ], "value": "12-DEC-2018" }, { "name": "MHYN", "value": "" }, { "name": "MHSPID", "value": "" }, { "name": "CMYN", "value": "" }, { "name": "CMSPID", "value": "" }, { "name": "AEYN", "value": "" }, { "name": "AESPID", "value": "" }, { "name": "LBYN", "value": "" } ], "instance": 1, "name": "Common" } ], "permission": { "addQuery": true, "addReason": true, "approveQuery": true, "approveReason": true, "attachDoc": true, "createData": true, "deleteData": true, "deleteQuery": true, "deleteReason": true, "ecAddQuery": true, "ecAddReason": true, "ecApproveReason": true, "ecDeleteQuery": true, "ecModifyQuery": true, "internalQuery": "showAll", "modifyData": true, "modifyQuery": true, "modifyReason": true, "replyQuery": true, "roleName": "unrestricted", "showHiddenField": true }, "plate": 1, "raster": "1837R0007001", "screen": 1, "status": 1, "studyId": 17, "subjectId": 1001, "visit": 1 }
Returns queries by site with optional filter subjectId (id).
GET /studies/:study_num/sitequeries/:site_id?id={subject_id}
{ "_remaining": 0, "_total": 2, "results": [ { "category": 2, "created": "2019-11-11T14:07:55", "createdBy": "datafax", "fid": 10619, "field": 8, "fieldId": 10382, "level": 1, "modified": "2019-11-11T14:07:55", "modifiedBy": "datafax", "name": "Did the subject meet all eligibility criteria?", "note": "", "page": "0", "plate": 2, "plateLabel": "Eligibility", "query": "", "raster": "0000/0000000", "replied": "", "repliedBy": "", "reply": "", "report": "000000", "resolved": "", "resolvedBy": "", "siteId": 1, "status": 0, "studyId": 17, "subjectAlias": "", "subjectId": 1005, "type": 2, "use": 1, "value": "Y", "visit": 1, "visitLabel": "Enrollment" }, { "category": 1, "created": "2019-11-11T15:15:45", "createdBy": "datafax", "fid": 11246, "field": 12, "fieldId": 11245, "level": 1, "modified": "2019-11-11T15:15:45", "modifiedBy": "datafax", "name": "Clinically Significant", "note": "", "page": "0", "plate": 4, "plateLabel": "Lab Results", "query": "", "raster": "0000/0000000", "replied": "", "repliedBy": "", "reply": "", "report": "000000", "resolved": "2019-11-11T15:15:45", "resolvedBy": "datafax", "siteId": 1, "status": 5, "studyId": 17, "subjectAlias": "", "subjectId": 1005, "type": 2, "use": 1, "value": "Not clinically significant", "visit": 1, "visitLabel": "Enrollment" } ] }
Returns queries by site as a report in Excel, csv or pipe-delimited data. Default exports all queries in Excel (base64 encoded) format. The request can be modified to retrieve queries for a given site and output csv or pipe-delimited data as needed. Further filtering is possible using a JSON-formatted payload containing any or all of the parameters listed below (sample values shown).
{ "categories": ["1","2"], "status": ["1","5"], "created": {"before": 10}, "modified": {"before": 8, "after": 2}, "subject": "10001", "sort": "created-ascending" }
POST /studies/:study_num/queries/export
the :study_num is an integer value
Output is base64-encoded Excel data that requires decoding and saving as an Excel file by the caller
POST /studies/:study_num/queries/export?site=:sitenum
the :study_num and :sitenum are integer values
POST /studies/:study_num/queries/export?output=xlsx|csv|dat
If output=xlsx, output is base64-encoded Excel data that requires decoding and saving as an Excel file by the caller. This is the same as the default request. If output=csv or output=dat then output is un-encoded comma or pipe-delimited query records
POST /studies/:study_num/queries/export?site=:sitenum&output=xlsx|csv|dat
Set, update or unset missed record with given set of keys.
{ "subjectId": 1056, "visit": 3, "plate": 1, "status": 0, "level": 2, "missedReason": { "code": 5, "setText": "Set as missed by API" } }
{ "message": "OK", "result": { "plates": { "1": "Success" }, "subjectAlias": "", "subjectId": 1056, "visit": 3 }, "status": 200 }
{ "subjectId": 1056, "visit": 3, "plate": 1, "status": 7, "level": 2, "missedReason": { "code": 5, "unsetText": "Test unset (delete) missed by API" } }
Set, update or unset a missed visit with given set of subject and visit. All required plates in the visit will be set or unset as missed.
{ "subjectId": 1056, "visit": 3, "status": 0, "level": 2, "missedReason": { "code": 5, "setText": "Set as missed by API" } }
{ "message": "OK", "result": { "plates": { "1": "Success", "4": "Success", "5": "Success", "6": "Success" }, "subjectAlias": "", "subjectId": 1056, "visit": 3 }, "status": 200 }
Add or Delete missing page queries. Note: only category 23 query can be added while queries with categories 21-23 can be deleted.
{ "subjectId": 1057, "visit": 0, "plate": 1, "status": 1, "level": 1, "category": 23, "use": 1, "type": 2, "note": "An optional note for mpquery added by API", "query": "An optional query text for mpquery added by API" }
{ "message": "OK", "status": 200 }
{ "subjectId": 1057, "visit": 0, "plate": 1, "status": 7 }
Returns reasons by site with optional filter subjectId (id).
GET /studies/:study_num/sitereasons/:site_id?id={subject_id}
{ "_remaining": 0, "_total": 4, "results": [ { "code": "", "created": "2020-05-29T12:09:45", "createdBy": "datafax", "fid": 11305, "field": 17, "fieldId": 11304, "level": 1, "modified": "2020-05-29T12:09:45", "modifiedBy": "datafax", "plate": 404, "plateLabel": "New tests and treatments aren’t offered to the public as soon as they’ re made. They need to be studied. A clinical trial is a type of research that studies a test or treatment given to people. Clinical trials study how safe and helpful tests and treat", "raster": "0000/0000000", "status": 1, "studyId": 17, "subjectAlias": "", "subjectId": 2001, "text": "Set by edit check cr53n003_setFieldValue", "visit": 404, "visitLabel": "General Concomitant Medications" }, { "code": "", "created": "2019-10-31T11:30:47", "createdBy": "datafax", "fid": 10930, "field": 8, "fieldId": 10489, "level": 1, "modified": "2019-10-31T11:30:47", "modifiedBy": "datafax", "plate": 20, "plateLabel": "Concomitant Medications", "raster": "0000/0000000", "status": 3, "studyId": 17, "subjectAlias": "", "subjectId": 2003, "text": "Conflict resolution, from (value on server): DRUGHH12345 to (value on local device): DRUGHHV", "visit": 201, "visitLabel": "Concomitant Medications #01" }, { "code": "", "created": "2019-10-31T11:30:47", "createdBy": "datafax", "fid": 10940, "field": 9, "fieldId": 10491, "level": 1, "modified": "2019-10-31T11:30:47", "modifiedBy": "datafax", "plate": 20, "plateLabel": "Concomitant Medications", "raster": "0000/0000000", "status": 3, "studyId": 17, "subjectAlias": "", "subjectId": 2003, "text": "Conflict resolution, from (val ue on server): TEST to (value on local device): VHVUGIBKBKN", "visit": 201, "visitLabel": "Concomitant Medications #01" }, { "code": "", "created": "2020-06-01T07:48:29", "createdBy": "datafax", "fid": 11305, "field": 17, "fieldId": 11304, "level": 1, "modified": "2020-06-01T07:48:29", "modifiedBy": "datafax", "plate": 404, "plateLabel": "New tests and treatments aren’t offered to the public as soon as they’ re made. They need to be studied. A clinical trial is a type of research that studies a test or treatment given to people. Clinical trials study how safe and helpful tests and treat", "raster": "0000/0000000", "status": 1, "studyId": 17, "subjectAlias": "", "subjectId": 2003, "text": "Set by edit check cr53n003_setFieldValue", "visit": 404, "visitLabel": "General Concomitant MedicationsGeneral C" } ] }
Returns tasks list user has permissions for.
GET /studies/:study_num/tasks
Get tasks list based on user permission
[ { "count": 18, "instruction": "This task is to be used for entering all Blood Pressure Screening data (plate 1) for which a corresponding fax image does not exist.", "mode": "Validate", "name": "Screening Data Entry", "runEC": true, "saveLevel": 2, "title": "Level 1 EDC entry of Blood Pressure Screening visits" }, { "count": 18, "instruction": "This task reviews all screening data (plate1) that currently exists at levels 1 and 2. This review includes both fax and EDC screening data.", "mode": "Validate", "name": "Screening Data Review", "runEC": true, "saveLevel": 3, "title": "Review of all patient screening data" } ]
Get task definition and list of task record keys
GET /studies/:study_num/tasks/:task_name
The :task_name is required. Any special characters or spaces in :task_name must be URL encoded
{ "_remaining": 0, "_total": 18, "context": { "args": {}, "endTime": "2022-07-25T16:12:05.945", "reportName": "Screening Data Review", "startTime": "2022-07-25T16:12:05.838", "studyId": 253, "studyName": "val253" }, "hiddenFields": [ 4 ], "keyFields": { "plate": "3", "site": "0", "subject": "4", "subjectAlias": "1", "visit": "2" }, "names": "Site|Subject|Visit|Plate|subject", "results": [ "10|10001|0|1|10001", "10|10002|0|1|10002", "10|10003|0|1|10003", "20|20002|0|1|20002", "20|20003|0|1|20003", "20|20005|0|1|20005", "20|20006|0|1|20006", "99|99001|0|1|99001", "99|99003|0|1|99003", "99|99004|0|1|99004", "99|99007|0|1|99007", "99|99008|0|1|99008", "99|99009|0|1|99009", "99|99010|0|1|99010", "99|99012|0|1|99012", "99|99013|0|1|99013", "99|99014|0|1|99014", "99|99015|0|1|99015" ], "sort": { "ascending": true, "field": "4" }, "tasks": { "instruction": "This task reviews all screening data (plate1) that currently exists at levels 1 and 2. This review includes both fax and EDC screening data.", "mode": "Validate", "name": "Screening Data Review", "runEC": true, "saveLevel": 3, "title": "Review of all patient screening data" } }
Get task definition and list of task record keys without the need of reports permission
GET /studies/:study_num/tasks/stats/:task_name?nocount
Parameter nocount is optional, when specified, the number of task records will be 0 in each task definition.
nocount
Returns total count of queries or reasons in the study database based on input criteria.
POST /queries/count
POST /reasons/count
{ "results": 71 }
Returns list of visits that exists in study database for the specified subject and plate.
GET /studies/:study_num/visits/:subject/:plate
the :subject, :plate are integer values
{ "plate": 5, "subject": 20006, "visits": [ 21, 22 ] }
Returns visit date that exisits in study database by subject and visit.
GET /studies/:study_num/visitdate/:subject/:visit
the :subject, :visit are integer values
{ "subjectId": 1005, "visit": 21, "visitDate": "2014-09-18" }
Report all changes made to data fields on the record with the given set of keys.
GET /studies/:studyNum/history/records/:subject/:visit/:plate?simplified
the :subject, :visit and :plate are integer values. Optional parameter simplified can be supplied to get simplified history where results are entirely in JSON.
simplified
{ "context": { "args": { "id": "1001", "plate": "1", "visit": "0" }, "endTime": "2022-07-26T16:07:22.345", "reportName": "", "startTime": "2022-07-26T16:07:22.344", "studyId": 17, "studyName": "DFUG 17" }, "names": "Date and Time|User Name|Type|Subject|Visit|Plate| Data Field|Data Field Description|What Changed|Old Value| New Value|Old Code Label|New Code Label|Query Usage/Reason Text| Query Category/Reason Code|Status|Level", "results": [ "2022-05-05 13:14:25|samer|new data|1001|0|1|1|DFdiscover Record Status|DFdiscover Record Status||2||incomplete||| incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|2|DFdiscover Validation Level|DFdiscover Validation Level||1||||| incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|3|DFdiscover Image Name|DFdiscover Image Name||2218R0007001|||||incomplete |subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|4|DFdiscover Study Number|DFdiscover Study Number||17|||||incomplete| subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|5|DFdiscover Plate Number|DFdiscover Plate Number||1|||||incomplete| subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|6|Visit Number |Visit Number||000|||||incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|7|Subject ID| Subject ID||1001|||||incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|8|Visit Date| Visit Date|||||||incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|9|Any medical history?|Any medical history?|||||||incomplete|subject helper1", "2022-05-05 13:14:25|samer|newdata|1001|0|1|10|MH #|MH #||||| ||incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|11|Any concomitant medications?|Any concomitant medications?||||||| incomplete|subject helper1", "2022-05-05 13:14:25|samer|newdata|1001|0|1|12|CM #|CM #||||| ||incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|13|Any adverse events?|Any adverse events?|||||||incomplete|subject helper1", "2022-05-05 13:14:25|samer|newdata|1001|0|1|14|AE #|AE #||||| ||incomplete|subject helper1", "2022-05-05 13:14:25|samer|new data|1001|0|1|15|Were labs collected?|Were labs collected?|||||||incomplete|subject helper1", "2022-05-05 13:14:25|samer|change data|1001|0|1|3|DFdiscover Image Name|DFdiscover Image Name|2218R0007001|2218/0008001||| ||incomplete|subject helper1" ] }
Sets language preference for eCRFs
PUT /studies/:study_num/language/pref/LANGUAGE
the :study_num is an integer value. LANGUAGE is a string indicating the language preference e.g. chinese, english, french, spanish
For better performance load study's setup, sites, missingmap and visitmap:
Get the details and data for the requested document having identifier image_id. Note that since the image_id can contain / it must be encoded in the request using %2F. The image stored in data is base64 encoded.
/
%2F
data
GET /studies/:study_num/documents/:image_id?chunk=:size
Optional parameter chunk can be specified for downloading document by small chunks of specified size in KB. If size is 0 or not specified the entire document is returned. When retrieving document in chunks the response JSON object include additional attributes total, indicating the total size of the document in bytes and remaining, which is the remaining chunk size to be downloaded (in bytes). When remaining is zero it is an indication that downloading of the entire document is complete. On the other hand, when there is pending data to be downloaded, remaining is greater than zero, the response code being returned is 206 (i.e. Partial contents).
chunk
total
remaining
[ { "arrival": "2020-10-20T14:06:25", "data": "base64 encoded string...", "fileName": "img_0001.jpg", "format": "jpg", "page": "1/1", "raster": "2042/000M001", "remaining": 484569, "sender": "DFws Attach DOC:yiguo", "total": 586969 } ]
Upload the document and add it to the record with the specified keys. The image contents stored in data are base64 encoded. fileName and format are optional.
fileName
format
POST /studies/:study_num/documents/:subject/:visit/:plate?create
Optional parameter create can be specified to create the record if it does not exist. This will be useful to attach document to a new record that does not already exist. Without this parameter any requests to attach documents to non-existent records will be rejected.
create
The body of the request must include JSON containing the document data encoded in base64.
Optionally data can be uploaded in chunks when total attribute is specified in JSON. When this attribute is not present or set to 0 the entire document is being uploaded as a single chunk. When the value of total is greater than the size of data contents the server returns the message Expect more data with a response code 206.
Expect more data
{ "data": "/9j/4Q/+RXhpZgAATU0AKgAAAAgACgEPAAIAAAAGAAAAhgEQAAIAAAAWAAAAjAESAAMAAAABAAYAAAEaAAUAAAABAAAA ...ogEbAIdpAAQAAAABAAAAzgAAAABBA7nUptKiTVZ1muWC7goyqMevzdwK7aaKK1Bt5t06yHOU4ww75rg==", "total": 586969 }
{ "message": "Expect more data", "status": 206 }
{ "arrival": "2021-05-11T11:16:09", "fileName": "ecg_scan.png", "format": "png", "page": "1/1", "raster": "2119/000L001", "sender": "DFws Attach DOC:next", "status": "secondary" }
For a record with the specified keys set an existing secondary document, having identifier image_id, to primary. Note that since the image_id can contain / it must be encoded in the request using %2F.
image_id
PUT /studies/:study_num/documents /:subject/:visit/:plate/:imageid?operation=primary
[ { "operation": "change to primary", "plate": 1, "raster": "2119/000N001", "subjectId": 1002, "visit": 0 } ]
For a record with the specified keys set an existing primary document, having identifier image_id, to secondary. Note that since the image_id can contain / it must be encoded in the request using %2F.
PUT /studies/:study_num/documents/: subject/:visit/:plate/:imageid?operation=secondary
For a record with the specified keys delete the existing document having identifier image_id. Note that since the image_id can contain / it must be encoded in the request using %2F.
PUT /studies/:study_num/documents/ :subject/:visit/:plate/:imageid?operation=delete
[ { "operation": "delete secondary", "plate": 1, "raster": "2042/000M001", "subjectId": 1002, "visit": 0 } ]
Submit study CRFs PDF document to server. The image contents stored in data are base64 encoded. fileName and format are optional.
PDF files submitted to the DFdiscover server are processed in the same manner as pages sent by DFsend, email or fax. Any barcoded pages are submitted to the new record queue for the appropriate study, where they can be retrieved and entered using DFexplore in Image View. Pages without barcodes are forwarded to the Image Router.
The body of the request must include JSON containing the CRF document data encoded in base64.
{ "data": "JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRmlsdGVyIC9GbGF0ZURlY29kZSA ...gCjAwMDA4OTkxNTkgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxNSAvUm9vdCAxNCAwIFIgL0luZm8gMSAwIFIgLgo=" }
Change current user's profile. The user profile information is a subset of the information known for a user account. The profile information can be changed by the user - other information requires admin privileges.
Change user's password. Must be the currently logged-in user.
{ "passExpiryDays": 180, "status": "OK" }
Verify that the password provided by the username matches the credentials provided during initial login.
{ "status": 3, "valid": true }
If the password is correct, the response includes true and status of 3. Otherwise the reponse includes false and status of 0, 1 or 2.
true
3
false
0, 1 or 2
Status code from the list:
When the status is 1, the account has been locked because the user has exceeded the number of allowed password errors as defined by the study administrator in DFadmin. When this happens, the DFdiscover server sends an email to the Notification Mail Recipient defined in DFadmin.
1
Forgot password request to send user a link to reset password. Must provide the DFdiscover server, username and the email address associated with user account.
{ "passExpiryDays": 0, "status": "OK" }
Get the details of one or all user account(s). If the ":user_name" modifier is omitted, all user accounts are retrieved.
GET /users/:user_name
[ { "administrator": "", "affiliation": "DF/Net Research Inc", "city": "", "country": "", "email": "", "fax": "", "fullName": "Ann Smith", "language": 0, "passwordExpiry": "2019-06-28", "phone": "", "postalCode": "", "receipt": 2, "routerAccess": false, "state": "", "status": 2, "streetAddress": "", "userName": "ann" } ]
Get the roles assigned to a user.
[ { "instance": 1, "subjects": 0, "roleId": 6, "sites": "*", "status": 2, "userName": "ann" } ]
Get the roles defined for a study.
GET /roles?study=:study_num
[ { "DFdiscoverReports": "*", "autoLogoutDefault": 0, "autoLogoutMaximum": 0, "description": "", "DFexploreViews": "*", "roleId": 1, "status": 2, "study": 154, "studyReports": "*", "tasks": "", "tools": "*" } ]
Get the role permissions for a role identifier.
[ { "data": "1,2,3,4", "getLevels": "*", "instance": 1, "modifyLevels": "*", "plates": "*", "query": "1,2,3,4,5", "reason": "1,2,3,4", "roleId": 1, "showBlindedFields": true, "showInternalQueries": true, "status": 2, "visits": "*", "writeLevels": "*" } ]
Get license usage information for the server.
GET /licensemetrics
[ { "adminInUse": 5, "adminMaxUsed": 5, "adminReserved": 5, "purchased": 30, "regularInUse": 6, "regularMaxUsed": 19, "rejected": 0, "startSince": "2017-07-07T09:33:40" } ]
Get feature metrics information for the server.
[ { "feature": "DFWS", "inUse": 1, "limit": 999, "maxUsed": 1, "rejected": 0 }, { "feature": "LS", "inUse": 0, "limit": 0, "maxUsed": 0, "rejected": 0 } ]
Export setup information in CDISC-ODM format. This output conforms with CDISC ODM Version 1.3.2.
PUT /studies/:studyNum/records/odm?xml
Output setup information only as JSON or optionally as xml.
The :studyNum is an integer value (required).
Output can include a description, study description and protocol name defined in the request body.
Optional Request
body example
{ "description": "Test ODM-description", "studyDescription": "Test study-description", "protocolName": "Test study-protocol" }
Export setup information and data in CDISC-ODM format. This output conforms with CDISC ODM Version 1.3.2.
PUT /studies/:studyNum/records/odm?xml&formdata
Output setup and data as JSON or optionally as xml.
Data can be filtered by optionally including a range of subject ids in the request body.
Data can also be filtered by optionally including a range of sites in the request body.
Data can be filtered by optionally including a range of events (visit#:plate# pairs) in the request body.
Data can optionally use fieldAlias for field names if included in the request body.
System fields can be optionally excluded in the request body.
{ "subjects": "#,#-#|all", "events":"visit#:plate#,..." "sites":"#,#-#|all" "fieldAlias":true|false "systemFields":true|false "description": "Test ODM-description", "studyDescription": "Test study-description", "protocolName": "Test study-protocol" }
This chapter guides a system administrator through the process of installing and starting the DFdiscover API server, DFws. The system administrator is expected to have good knowledge of administering a UNIX system.
DFws is supported on Novell openSUSE version 13.2 and newer, Leap 42.1 and newer, SUSE Tumbleweed and Redhat Enterprise Linux up to version 7.2 or newer. DFws is a 64-bit server application - it installs on the 64-bit versions of any of these Linux distributions. It will not run on 32-bit systems. Other Linux distributions may work, but are unsupported. Debian distributions such as Ubuntu will not work at this time. CentOS and Oracle Linux are clones of RHEL and will work as expected.
Before installing DFws, confirm that the file descriptor limit is set to at least 65535. Confirm the current setting with the command:
# ulimit -a
The output will include a setting for open files. Update this value to 65535, by editing the system file, /etc/sysctl.conf. The setting in the file must be set to
open files
/etc/sysctl.conf
fs.file-max=65535
If the setting is not present in the file, add it as a new line to the bottom of the file. If the setting is already defined and set to a higher value, do not change it. Otherwise, update it as indicated. If the file is changed, advise the system of the change with the command:
# sysctl -p
A complete installation requires approximately 370 Mb of free disk space for the software and documentation. The software is installed in /opt/dfws.
/opt/dfws
To install:
The DFws rpm is available from the DFnet website, www.dfnetresearch.com, specifically the Software Releases page (account required).
Download the installation rpm, dfws-5.9-0.x86_64.rpm, to a suitable location on the local server.
dfws-5.9-0.x86_64.rpm
Install the downloaded rpm. Change directories to the location where the rpm was downloaded. Assuming that you have downloaded the rpm to the /tmp directory,
/tmp
# cd /tmp
followed by the appropriate command for your server OS type.
On a RHEL/CentOS server:
# dnf --nogpgcheck install dfws-5.9-0.x86_64.rpm
On openSUSE, use:
# zypper --no-gpg-checks install dfws-5.9-0.x86_64.rpm
The software is installed in the /opt/dfws directory.
DFws is configured via properties in the /opt/dfws/dfws.cf file. The file location is fixed. In most cases, the contents will not need to be changed.
/opt/dfws/dfws.cf
A semi-colon at the beginning of a line indicates that the line is a comment and is ignored as a configuration property. Configurations are defined one per line, with the format
configurable_property_keyword=value
A typical configuration file includes the following:
;DFWS_PORT=4433 ;DFWS_SSL_KEY=/opt/dfws/private.key ;DFWS_SSL_CERT=/opt/dfws/local.crt ;DFWS_SSL_CIPHERS=ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES128-SHA256,TLS_AES_128_GCM_SHA256,TLS_CHACHA20_POLY1305_SHA256 ;DFWS_DATABASE=/opt/dfws/dfws.db DFWS_LOG_THRESHOLD=3 DFWS_MAX_SOCKET_THREADS=200 DFWS_MAX_PENDING_CONN=99 DFWS_SESSION_EXPIRY_CHECK=30 DFWS_USER_SERVER_SESSIONS_LIMIT=15 DFWS_NOTIFICATION_RECIPIENTS="craig@dfnetresearch.com, samer@dfnetresearch.com, macdouc@dfnetresearch.com" DFWS_BIND_ADDRESS=10.0.0.6 DFWS_HOST_FQDN="explore.dfdiscover.com"
The configurable properties are as follows:
DFWS_PORT
DFWS_SSL_KEY
/opt/dfws/private.key
DFWS_SSL_CERT
/opt/dfws/local.crt
DFWS_SSL_CIPHERS
DFWS_DATABASE
/opt/dfws/dfws.db
DFWS_LOG_THRESHOLD
DFWS_MAX_SOCKET_THREADS
DFWS_MAX_PENDING_CONN
DFWS_SESSION_EXPIRY_CHECK
DFWS_USER_SERVER_SESSIONS_LIMIT
DFWS_NOTIFICATION_RECIPIENTS
DFWS_BIND_ADDRESS
DFWS_HOST_FQDN
CAUTION: Use caution when setting the DFWS_HOST_FQDN value. This FQDN will be emailed to the users trying to reset their password, and having an incorrect/wrong FQDN can lead the user to a third party website.
If the configuration file is modified while DFws is running, send signal SIGHUP to the running DFws process - the signal is interpreted by DFws as a request to reload the configuration file. This will also reload the DF_DEVELOPERS table records.
SIGHUP
DF_DEVELOPERS
To reload the configuration file after it is changed:
Determine the process id, pid, of DFws:
pid
# ps -ax | grep DFws
Send the SIGHUP signal to DFws:
# kill -HUP pid
While DFws is operational, it manages two tables in its system database. If not already present, the SQLite database DFWS_DATABASE is created with the required tables and default accounts. The database has two tables: one for API client accounts, DF_DEVELOPERS, and one for message logging, DF_LOG.
DF_LOG
API clients must be provided with login credentials (CLIENT_ID, CLIENT_PASS, CLIENT_SECRET and API server Base URI) to use the API.
API server Base URI
The DF_DEVELOPERS table contains the following information:
DFDEVID
DFLOGIN
DFPASSWD
DFSECRETKEY
DFADMIN
DFSTATUS
DFEXPIRY
DFLASTACCESS
The DFws admin must create an account for each new API client by adding records to the DF_DEVELOPERS table. This is done using DFwsadmin. Typically, API clients are defined for one year. After creation, the DFws admin must also maintain the validity of each client by refreshing the expiry date.
The default datafax:passwd account is created by DFws on first launch, and is valid for 24 hours.
datafax:passwd
Configured by the value of the DFWS_LOG_THRESHOLD parameter, DFws logs key events such as unauthorized requests, invalid tokens or invalid requests to the DF_LOG table. The value is a code from the list: 0=Fatal, 1=Critical, 2=Warning, 3=Verbose, 4=Info. The specified value is cumulative so that each number includes itself and all lower numbers.
The DF_LOG table contains the following information:
DFTIMESTAMP
DFTYPE
DFMESSAGE
DFPEER
DFURI
DFMETHOD
DFDEVLOGIN
DFUSER
DFwsadmin can be used to examine the contents of the table. There is also an API request available, see Log.
DFws is configured as a systemd service. Use systemctl to start and stop DFws and to enable the daemon to automatically restart on a system reboot. To start DFws:
# systemctl start dfws.service
To stop DFws:
# systemctl stop dfws.service
To enable automated start of DFws on reboot:
# systemctl enable dfws.service
To disable automated start of DFws on reboot:
# systemctl disable dfws.service
To determine the current status of DFws:
# systemctl status dfws.service
A running DFws server will process requests, encrypted using SSL, over the specified DFWS_PORT port. For DFws developers, the base URI to send requests is:
https://{SERVER_HOSTNAME}:{DFWS_PORT}/dfws/v5
Once DFws is available, your developers will expect that they can access it 24x7. While there is very little that requires active attention, it is important to monitor it on a regular basis. To most effective solution for monitoring DFws is the companion, command-line executable, DFwsadmin.
DFwsadmin is a command-line application that is installed with DFws. It is available for use by the system super-user on the DFws server.
DFwsadmin offers 3 broad types of interaction and information:
Client account addition/deletion/update/review
Log review and deletion
DFws status
API client accounts are managed with the following commands:
# DFwsadmin add -client id -pass password -secret key [-status 1|0] [-admin Y|N] [-expiry days] # DFwsadmin modify id [-client id] [-pass password] [-secret key] [-status 1|0] [-admin Y|N] [-expiry days] # DFwsadmin delete id # DFwsadmin show [-decode] [id]
The API client accounts output has the following format:
CLIENTID|PASSWORD|SECRET|ADMIN|STATUS|EXPIRYDATE|LASTACCESSED php_client|******|******|Y|Enable|20200102101541|20181231000000 nodejs_client|******|******|N|Disable|20200102092239|20181231000000 testapi|******|******|N|Disable|20200104092321|20181231000000 collectapp|******|******|N|Enable|20200111160239|20190111160239 webapp|******|******|N|Enable|20200111160336|20190111160336
CLIENTID is unique login name for the API client
CLIENTID
PASSWORD is password for the API client
PASSWORD
SECRET is secret passcode for the API client to encode JWT tokens
SECRET
ADMIN is administrative privileges setting for the API client
ADMIN
STATUS is client account status of being enabled or disabled
STATUS
EXPIRYDATE is the client account expiry date (YYYYMMDDHHMMSS)
EXPIRYDATE
LASTACCESSED is the timestamp of last successful client log-in (YYYYMMDDHHMMSS)
LASTACCESSED
Activity on the DFws server is monitored with these commands:
# DFwsadmin showlog [-oldest|newest #] [-peer peer] [-client id] [-status status] [-contain message] [-type log_type] [-from date] [-to date] [-user username]] # DFwsadmin clearlog [-oldest|newest #] [-peer peer] [-client id] [-status status] [-contain message] [-type log_type] [-from date] [-to date] [-user username]]
The log output has the following format:
LOGDATE|TYPE|MESSAGE|PEER|URI|METHOD|CLIENTID|USER|STATUS 20190116153756300|3|Invalid API call|::ffff:192.168.4.223|/dfws/v5/logs|GET|||503 20190116153028603|1|Attempt to access session owned by another api-client: dfphp|::ffff:192.168.4.223|/dfws/v5/studies/154/records/1001/0/1|GET|DFweb||401 20190116150951215|1|Invalid authorization token|::ffff:192.168.4.223|/dfws/v5/authorize|POST|dfphp||401
LOGDATE format is YYYMMDDHHMMSSZZZ, where ZZZ is milliseconds (zero padded)
LOGDATE
TYPE is the type of log message reported, from the list 0=Fatal, 1=Critical, 2=Warning, 3=Verbose, 4=Info
TYPE
PEER is the IP address of the client machine that sent the request
PEER
URI is the request sent by the client
URI
METHOD is the HTTP method of the request from the list: GET, POST, LOCK, UNLOCK, or DELETE
METHOD
CLIENTID is the ID of client sending the request
USER is DFdiscover username used to authorize the session associated with current request
USER
STATUS is HTTP response status code (generally an HTTP error code) returned by API server for the request
To determine the current status of DFws, use the command:
# DFwsadmin apistatus
Output is one of:
DFws API server is not running.
DFws API server is running.
Additionally, information about the number of active client sessions is written to the system log in the following format:
Mar 16 10:52:40 dfws dfws.sh[108576]: INFO: Serving 10 active sessions.
DFdiscover software uses several third-party software components as part of its server side and/or client tools.
The copyright information for each is provided below. If you would like to receive source codes of these third-party components, please send us your request at help@dfnetresearch.com.
Copyright© 1994-2011, OFFIS e.V. All rights reserved.
This software and supporting documentation were developed by
OFFIS e.V. R&D Division Health Eschereg 2, 26121 Oldenburg, Germany
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of OFFIS nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright© 2009-2014 Petri Lehtinen <petri&digip.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright© 1991 Bell Communications Research, Inc. (Bellcore)
Permission to use, copy, modify, and distribute this material for any purpose and without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies, and that the name of Bellcore not be used in advertising or publicity pertaining to this material without the specific, prior written permission of an authorized representative of Bellcore. BELLCORE MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
Copyright© 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software.
Copyright© 1993,1994 by Carnegie Mellon University All Rights Reserved.
Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Carnegie Mellon University not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Carnegie Mellon University makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Copyright© 1988-1997 Sam Leffler Copyright© 1991-1997 Silicon Graphics, Inc.
Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics.
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Portions© 1996-2019, PostgreSQL Global Development Group Portions© 1994, The Regents of the University of California
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Copyright© 1998-2019 The OpenSSL Project. All rights reserved.
All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in .the OpenSSL Toolkit." (https://www.openssl.org/)
The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.
Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.
Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (https://www.openssl.org)
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com).
Copyright© 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved.
This package is an SSL implementation written by Eric Young (eay@cryptsoft.com). The implementation was written so as to conform with Netscapes SSL.
This library is free for commercial and non-commercial use as long as the following conditions are aheared to. The following conditions apply to all code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; not just the SSL code. The SSL documentation included with this distribution is covered by the same copyright terms except that the holder is Tim Hudson (tjh@cryptsoft.com).
Copyright remains Eric Young's, and as such any Copyright notices in the code are not to be removed. If this package is used in a product, Eric Young should be given attribution as the author of the parts of the library used. This can be in the form of a textual message at program startup or in documentation (online or textual) provided with the package.
Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer.
All advertising materials mentioning features or use of this software must display the following acknowledgement: "This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)" The word "cryptographic" can be left out if the routines from the library being used are not cryptographic related :-).
If you include any Windows specific code (or a derivative thereof) from the apps directory (application code) you must include an acknowledgement: "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
THIS SOFTWARE IS PROVIDED BY ERIC YOUNG "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The licence and distribution terms for any publically available version or derivative of this code cannot be changed. i.e. this code cannot simply be copied and put under another distribution licence [including the GNU Public Licence.]
GNU GENERAL PUBLIC LICENSE Version 2, June 1991
https://www.gnu.org/licenses/gpl-2.0.html
Copyright© 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
The files in the base, psi, lib, toolbin, examples, doc and man directories (folders) and any subdirectories (sub-folders) thereof are part of GPL Ghostscript.
The files in the Resource directory and any subdirectories thereof are also part of GPL Ghostscript, with the explicit exception of the files in the CMap subdirectory (except "Identity-UTF16-H", which is part of GPL Ghostscript). The CMap files are copyright Adobe Systems Incorporated and covered by a separate, GPL compatible license.
The files under the jpegxr directory and any subdirectories thereof are distributed under a no cost, open source license granted by the ITU/ISO/IEC but it is not GPL compatible - see jpegxr/COPYRIGHT.txt for details.
GPL Ghostscript is free software; you can redistribute it and/or modify it under the terms the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
GPL Ghostscript is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program so you can know your rights and responsibilities. It should be in a file named doc/COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place Suite 330, Boston, MA, 02111-1307, USA.
GPL Ghostscript contains an implementation of techniques covered by US Patents 5,055,942 and 5,917,614, and corresponding international patents. These patents are licensed for use with GPL Ghostscript under the following grant:
Whereas, Raph Levien (hereinafter "Inventor") has obtained patent protection for related technology (hereinafter "Patented Technology"), Inventor wishes to aid the the GNU free software project in achieving its goals, and Inventor also wishes to increase public awareness of Patented Technology, Inventor hereby grants a fully paid up, nonexclusive, royalty free license to practice the patents listed below ("the Patents") if and only if practiced in conjunction with software distributed under the terms of any version of the GNU General Public License as published by the
Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111.
Inventor reserves all other rights, including without limitation, licensing for software not distributed under the GNU General Public License.
5055942 Photographic image reproduction device using digital halftoning to para images allowing adjustable coarseness 5917614 Method and apparatus for error diffusion paraing of images with improved smoothness in highlight and shadow regions
GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 https://www.gnu.org/licenses/lgpl-2.1.html
Copyright© 1991, 1999
Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]
Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method:
we copyright the library, and
we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
The modified work must itself be a software library.
You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License.
Also, you must do one of these things:
Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that
uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and
will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
© Wang Bin wbsecg1@gmail.com Shanghai University->S3 Graphics->Deepin, Shanghai, China 2013-01-21
QtAV is free software licensed under the term of LGPL v2.1. The player example is licensed under GPL v3. If you use QtAV or its constituent libraries, you must adhere to the terms of the license in question.
Rather than repeating the text of the LGPL v2.1, the original text can be found in GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1.
Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to FFmpeg.
The MIT License (MIT) © 2013 Masayuki Tanaka
Copyright© 2010-2017 Mike Bostock All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MIT License
Copyright © 2018 Dominik Thalhammer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License
Copyright © 2017-, https://github.com/j2doll/QXlsx