Appearance
Generate Answers CSV
Request the generation of a CSV export containing all quiz responses.
Overview
This endpoint initiates an asynchronous process to export all quiz answers to a CSV file. The export is queued for processing and will be made available once complete.
Method: POST
Endpoint:/api/v1/namespaces/:namespaceId/quizzes/:quizId/csvExport
Requires administrative authentication.
Complete Export Flow
Exporting quiz answers to CSV is an asynchronous process that requires three steps:
- Request the export - POST to this endpoint to queue the export job
- Poll for completion - GET the quiz endpoint until
csvExportStatuschanges from"uploading"to"done" - Download the file - Use the
csvExportPathfield from the quiz response to download the CSV file
Refer to the Quick Reference section in the Attune platform for a detailed breakdown of the contents of this file.
Request
Headers
http
x-api-key: {your_api_key} # Required
Content-Type: application/jsonPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
namespaceId | string | ✅ | Namespace unique ID |
quizId | string | ✅ | Quiz unique ID |
Response
json
{
"queued": true
}The response indicates that the export process has been queued successfully. The actual CSV file will be generated asynchronously.
Polling for Export Status
After requesting the export, poll the Get Quiz endpoint to check the export status:
http
GET /api/v1/namespaces/:namespaceId/quizzes/:quizIdThe quiz response will include:
| Field | Type | Description |
|---|---|---|
csvExportStatus | string | Export status: "uploading" or "done" |
csvExportPath | string | Download URL for the CSV file (available when status is "done") |
Example Polling Response
While processing:
json
{
"id": "quizId",
"csvExportStatus": "uploading",
...
}When complete:
json
{
"id": "quizId",
"csvExportStatus": "done",
"csvExportPath": "https://storage.example.com/exports/quiz-answers.csv",
...
}Error Responses
500 Internal Server Error– If the namespace or quiz does not exist
json
{
"error": "namespace does not exist"
}json
{
"error": "quiz does not exist"
}Alternative Export Options
If this endpoint does not meet your requirements, Attune also offers SFTP export with support for PGP encryption or your preferred encryption method. This is ideal for automated data integration, compliance requirements, or secure bulk transfers.
If neither option works for your use case, please contact us and we'll work with you to find a solution.