This page provides explains how to use the APIs for the OC call; by calling these APIs, you can find out how much time the API call takes for a specific study. Follow the below steps to run the APIs.to:
Find the API call time.
Check connection to OC.
Verify API based authentication
Why run these APIs?
When the 'OpenClinica Study Data Importer' job takes time (20-30 minutes), it becomes difficult to test the configuration and run the job to sync in the data.
Steps to run the APIs
Invoke API to get the token on the terminal.
Expand | ||
---|---|---|
| ||
In above code, ‘POST’ and ‘Content-Type’ will remain fixed. Code that will vary Server credentials: Username and password Server URL: |
...
your OC server URL
After invoking auth API, you will receive a token, as shown below.
|
2. Use the token and invoke Invoke data API to get the study data
Expand | ||
---|---|---|
| ||
In the above code, the 'GET' and 'Authorization' will remain fixed. Code that will vary Token: Server URL: Study Name: |
...
study OID from the |
...
OC. |
...
After |
...
Invoking data API, you will |
...
know how much time |
...
it |
...
takes to |
...
download study data. |
Once you get the API’s time, you can inform the OpenClinica team to resolve the issue.