# Get Collection Export Status GET https://api.prolific.com/api/v1/data-collection/collections/{collection_id}/export/{export_id} Polls the status of an asynchronous collection export job initiated by `POST /collections/{collection_id}/export`. Returns the current status of the export: - **generating** — the export is still being built; continue polling. - **complete** — the export is ready; a presigned HTTPS download URL is included. URLs are valid for 24 hours and are automatically refreshed if expired. - **failed** — generation failed (e.g. the archive was deleted from storage). Re-send `POST /collections/{collection_id}/export` to retry. Reference: https://docs.prolific.com/api-reference/ai-task-builder/get-collection-export-status ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: Prolific API for Data Collectors version: 1.0.0 paths: /api/v1/data-collection/collections/{collection_id}/export/{export_id}: get: operationId: get-collection-export-status summary: Get Collection Export Status description: >- Polls the status of an asynchronous collection export job initiated by `POST /collections/{collection_id}/export`. Returns the current status of the export: - **generating** — the export is still being built; continue polling. - **complete** — the export is ready; a presigned HTTPS download URL is included. URLs are valid for 24 hours and are automatically refreshed if expired. - **failed** — generation failed (e.g. the archive was deleted from storage). Re-send `POST /collections/{collection_id}/export` to retry. tags: - subpackage_aiTaskBuilder parameters: - name: collection_id in: path required: true schema: type: string - name: export_id in: path required: true schema: type: string - name: Authorization in: header required: true schema: type: string responses: '200': description: Export status content: application/json: schema: $ref: '#/components/schemas/CollectionExportStatus' '404': description: Export job not found content: application/json: schema: $ref: '#/components/schemas/Error' servers: - url: https://api.prolific.com components: schemas: CollectionExportStatusOneOf0Status: type: string enum: - generating title: CollectionExportStatusOneOf0Status CollectionExportStatus0: type: object properties: status: $ref: '#/components/schemas/CollectionExportStatusOneOf0Status' export_id: type: string format: uuid description: >- The export job ID. Use this with `GET /collections/{collection_id}/export/{export_id}` to poll for status. required: - status - export_id description: An export job that has been enqueued and is currently being generated. title: CollectionExportStatus0 CollectionExportStatusOneOf1Status: type: string enum: - complete title: CollectionExportStatusOneOf1Status CollectionExportStatus1: type: object properties: status: $ref: '#/components/schemas/CollectionExportStatusOneOf1Status' url: type: string format: uri description: >- Presigned HTTPS URL for downloading the ZIP archive. Valid for 24 hours. Re-poll to get a refreshed URL if expired. expires_at: type: string format: date-time description: ISO 8601 timestamp indicating when the presigned URL expires. required: - status - url - expires_at description: >- An export job that has completed successfully. The ZIP archive is ready to download. title: CollectionExportStatus1 CollectionExportStatusOneOf2Status: type: string enum: - failed title: CollectionExportStatusOneOf2Status CollectionExportStatus2: type: object properties: status: $ref: '#/components/schemas/CollectionExportStatusOneOf2Status' required: - status description: >- An export job that failed to generate, or whose archive has since been deleted. Re-send `POST /collections/{collection_id}/export` to retry. title: CollectionExportStatus2 CollectionExportStatus: oneOf: - $ref: '#/components/schemas/CollectionExportStatus0' - $ref: '#/components/schemas/CollectionExportStatus1' - $ref: '#/components/schemas/CollectionExportStatus2' description: The current status of a collection export job. title: CollectionExportStatus ErrorDetailDetail2: type: object properties: any_field: type: array items: type: string description: >- Name of the field with a validation error and as a value an array with the error descriptions description: All fields with validation errors title: ErrorDetailDetail2 ErrorDetailDetail: oneOf: - type: string - type: array items: type: string - $ref: '#/components/schemas/ErrorDetailDetail2' description: Error detail title: ErrorDetailDetail ErrorDetail: type: object properties: status: type: integer description: Status code as in the http standards error_code: type: integer description: Internal error code title: type: string description: Error title detail: $ref: '#/components/schemas/ErrorDetailDetail' description: Error detail additional_information: type: string description: Optional extra information traceback: type: string description: Optional debug information interactive: type: boolean required: - status - error_code - title - detail title: ErrorDetail Error: type: object properties: error: $ref: '#/components/schemas/ErrorDetail' required: - error title: Error securitySchemes: token: type: apiKey in: header name: Authorization ``` ## SDK Code Examples ```python import requests url = "https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id" headers = {"Authorization": "Token "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id'; const options = {method: 'GET', headers: {Authorization: 'Token '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Token ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Token ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id") .header("Authorization", "Token ") .asString(); ``` ```php request('GET', 'https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id', [ 'headers' => [ 'Authorization' => 'Token ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Token "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Token "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/data-collection/collections/collection_id/export/export_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```