...
This page explains to exporting a query data using the APIs.
Exporting query data
Method | POST | ||
URL |
| ||
Body |
| ||
Response |
|
Parameters
Attribute | Description | Allowed values | savedQueryId | The id of the query that you are trying to export. | Integer only|
---|---|---|---|---|---|
drivingForm | The search perspective is determined by the driving form. If left empty, it defaults to "Participant." (For instance, when the driving form is set to "Participant," the root table becomes 'catissue_coll_prot_reg,' which is then joined with other tables. Similarly, if the driving form is set to "Specimen," the root table will be 'catissue_specimen,' which will also be joined with other tables.) | Participant, Specimen | |||
cpId | When exporting for a single CP, include its CPID. For exporting all or multiple CPs, use a value of -1. | Integer only | |||
aql | A valid AQL query for exporting data to a CSV file. | String | |||
wideRowMode |
| DEEP, SHALLOW, OFF | |||
dataFile | Handle or file ID to use for downloading the exported CSV file. | string | |||
Completed | Boolean indicating whether the exported CSV file can be downloaded right away. | true, false |
Download Exported Data File
Method | GET | ||
URL |
| ||
Response | Case 1: When export data file is not ready, you will get HTTP response code 400 with the below message.
Case 2: When the exported data file is ready, you will receive an HTTP response code 200 along with the ZIP binary stream included in the response body. |
Sample code
Below is attached a zip file, which includes the bash script along with a config file. Download the zip file.
...