19 OpenClinica 4 Technical Documentation

OpenClinica has a highly capable RESTful web services API that enables you to interchange data programmatically with other systems, as well as carry out bulk actions such as importing data, scheduling events, or creating study participants.

The following pages are designed to help you understand how to use this API. We also provide an API toolset, called Swagger, that enables you to better understand and interact with various API endpoints. You can access the Swagger interface for your OpenClinica domain by clicking your username and selecting Administration > Web Services Information.

API users of OpenClinica will need an authentication token in order to access the API endpoints. An authentication token can be obtained by calling the following endpoint:


POST {serverName}/user-service/api/oauth/tokenwhere {serverName} is your study build URL.

For example: https: //xyz.build.openclinica.io

Request Header:

  • Content-Type: application/json

Request Body:

	"username":" ",
	"password":" "

Response Body:

Response body will contain the authentication token.

API users should then supply this authentication token (as shown below) in the “Authorization” header as a bearer token when accessing other endpoints.

Authorization: Bearer "authentication token";

Functional approval by rbhatnagar. Signed on 2019-08-02 5:18PM

Approved for publication by Benjamin Baumann (bbaumann), Principal. Signed on 2019-08-02 5:49PM

Not valid unless obtained from the OpenClinica document management system on the day of use.