Export study data to Excel
Create an Excel export of a test’s raw data, then download the file when processing finishes. Use the API application that created the export to check its status and download it.
For JSON, use Download study data.
Create the export
Section titled “Create the export”Find the test’s RedJade ID. Set TEST_ID to that ID:
TEST_ID=12345curl --fail-with-body --request POST \ "https://app.redjade.net/api/v1/sensory_tests/$TEST_ID/export_raw_data" \ --header "Authorization: Bearer $REDJADE_TOKEN" \ --data 'data_labels=numeric'Choose the representation of choice answers with data_labels:
| Value | Spreadsheet content |
|---|---|
numeric |
Numeric answer values; the default |
labeled |
Answer labels |
numeric-labeled |
Both numeric values and labels |
Save response.id from the returned document. Use this ID to check progress; another export request creates a separate document.
Check the export status
Section titled “Check the export status”Set DOCUMENT_ID to the ID returned by the export request:
DOCUMENT_ID=123curl --fail-with-body \ "https://app.redjade.net/api/v1/documents/$DOCUMENT_ID" \ --header "Authorization: Bearer $REDJADE_TOKEN"Read response.status:
| Status | Meaning |
|---|---|
pending |
The export is queued. |
started |
RedJade is building the file. |
completed |
Download the file from response.download_url. |
failed |
Stop polling and contact Support with the document ID. |
Poll every few seconds until the status is completed or failed, with a timeout in your application. response.download_url is present in every status response. It returns 404 until the file is attached; wait for completed before requesting it.
The same response fields appear at each stage, shown here with unrelated fields omitted:
Download the file
Section titled “Download the file”Set DOWNLOAD_URL to the returned response.download_url:
curl --fail-with-body "$DOWNLOAD_URL" \ --header "Authorization: Bearer $REDJADE_TOKEN" \ --output raw-data.xlsxA different API application can receive 404 for this document even when it belongs to the same company. See API errors for other failures.