# Get Batch Report GET https://api.prolific.com/api/v1/data-collection/batches/{batch_id}/report/ Get a presigned URL to download the batch responses as a CSV report. The CSV contains your original dataset with additional columns for participant responses. Reference: https://beta-docs.prolific.com/api-reference/ai-task-builder/get-task-builder-batch-report ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get Batch Report version: endpoint_aiTaskBuilder.GetTaskBuilderBatchReport paths: /api/v1/data-collection/batches/{batch_id}/report/: get: operationId: get-task-builder-batch-report summary: Get Batch Report description: >- Get a presigned URL to download the batch responses as a CSV report. The CSV contains your original dataset with additional columns for participant responses. tags: - - subpackage_aiTaskBuilder parameters: - name: batch_id in: path required: true schema: type: string - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: >- #/components/schemas/AI Task Builder_GetTaskBuilderBatchReport_Response_200 '400': description: Error content: {} components: schemas: ApiV1DataCollectionBatchesBatchIdReportGetResponsesContentApplicationJsonSchemaHttpMethod: type: string enum: - value: GET AI Task Builder_GetTaskBuilderBatchReport_Response_200: type: object properties: url: type: string description: Presigned URL to download the CSV report expires_at: type: string format: date-time description: When the presigned URL expires http_method: $ref: >- #/components/schemas/ApiV1DataCollectionBatchesBatchIdReportGetResponsesContentApplicationJsonSchemaHttpMethod description: HTTP method to use with the presigned URL ``` ## SDK Code Examples ```python import requests url = "https://api.prolific.com/api/v1/data-collection/batches/batch_id/report/" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.prolific.com/api/v1/data-collection/batches/batch_id/report/'; const options = {method: 'GET', headers: {Authorization: ''}}; 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/batches/batch_id/report/" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") 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/batches/batch_id/report/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.get("https://api.prolific.com/api/v1/data-collection/batches/batch_id/report/") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://api.prolific.com/api/v1/data-collection/batches/batch_id/report/', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp var client = new RestClient("https://api.prolific.com/api/v1/data-collection/batches/batch_id/report/"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/data-collection/batches/batch_id/report/")! 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() ```