Skip to content

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.

Find the test’s RedJade ID. Set TEST_ID to that ID:

Terminal window
TEST_ID=12345
curl --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.

Set DOCUMENT_ID to the ID returned by the export request:

Terminal window
DOCUMENT_ID=123
curl --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:

{
"response": {
"id": 123,
"status": "pending",
"download_url": "https://app.redjade.net/api/v1/files/EXAMPLE_FILE_KEY"
}
}

Set DOWNLOAD_URL to the returned response.download_url:

Terminal window
curl --fail-with-body "$DOWNLOAD_URL" \
--header "Authorization: Bearer $REDJADE_TOKEN" \
--output raw-data.xlsx

A different API application can receive 404 for this document even when it belongs to the same company. See API errors for other failures.