# Count study submissions by status GET https://api.prolific.com/api/v1/studies/{id}/submissions/counts/ Returns a count of the number of submissions per submission status in the study. Reference: https://beta-docs.prolific.com/api-reference/studies/count-study-submissions-by-status ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Count study submissions by status version: endpoint_studies.CountStudySubmissionsByStatus paths: /api/v1/studies/{id}/submissions/counts/: get: operationId: count-study-submissions-by-status summary: Count study submissions by status description: >- Returns a count of the number of submissions per submission status in the study. tags: - - subpackage_studies parameters: - name: id in: path description: Study id required: true schema: type: string - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: Count of number of submissions per submission status for a study content: application/json: schema: $ref: '#/components/schemas/SubmissionsCountResponse' '400': description: Error content: {} components: schemas: SubmissionsCountResponse: type: object properties: ACTIVE: type: number format: double APPROVED: type: number format: double AWAITING REVIEW: type: number format: double REJECTED: type: number format: double RESERVED: type: number format: double RETURNED: type: number format: double TIMED-OUT: type: number format: double PARTIALLY APPROVED: type: number format: double SCREENED OUT: type: number format: double TOTAL: type: number format: double description: The total number of submissions in the study. ``` ## SDK Code Examples ```python import requests url = "https://api.prolific.com/api/v1/studies/id/submissions/counts/" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.prolific.com/api/v1/studies/id/submissions/counts/'; 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/studies/id/submissions/counts/" 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/studies/id/submissions/counts/") 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/studies/id/submissions/counts/") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://api.prolific.com/api/v1/studies/id/submissions/counts/', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp var client = new RestClient("https://api.prolific.com/api/v1/studies/id/submissions/counts/"); 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/studies/id/submissions/counts/")! 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() ```