---
title: "Get Task Statistics"
method: GET
path: "/api/task/statistics"
tags: ["Turbinia Tasks"]
---

# Get Task Statistics

`GET /api/task/statistics`

Retrieves  statistics for Turbinia execution.

Args:
  days (int): The number of days we want history for.
  task_id (string): The Id of the task.
  request_id (string): The Id of the request we want tasks for.
  user (string): The user of the request we want tasks for.

Returns:
  statistics (str): JSON-formatted task statistics report.

## Query parameters

- `days` integer
- `task_id` string
- `request_id` string
- `user` string

## Response `200`

Successful Response

- CompleteTurbiniaStats — Statistics for different groups of tasks.
  - `all_tasks` object
  - `failed_tasks` object
  - `requests` object
  - `successful_tasks` object
  - `tasks_per_type` object
  - `tasks_per_user` object
  - `tasks_per_worker` object

## Other responses

- `422` — Validation Error

## Changes

> 12 revisions in range; 1 could not be searched.

- **2023-10-05** `29f05144f92c` — 7 breaking
  - the response property `all_tasks` became optional for the status `200`
  - the response property `failed_tasks` became optional for the status `200`
  - the response property `requests` became optional for the status `200`
  - the response property `successful_tasks` became optional for the status `200`
  - …3 more
- **2023-09-02** `84be51c47516` — 1 breaking, 7 info
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - added the required property `all_tasks` to the response with the `200` status
  - added the required property `failed_tasks` to the response with the `200` status
  - added the required property `requests` to the response with the `200` status
  - …4 more
- **2023-08-31** `7a1457492ab1` — 1 info
  - endpoint added
- **2022-08-29** `c6a8784c5202` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/google/apis/turbinia-api-server/changes/api/task/statistics/get.md)

---

[API](https://skmtc.dev/google/apis/turbinia-api-server.md) · [All operations](https://skmtc.dev/google/apis/turbinia-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/turbinia-api-server/revisions/207d6275cb53/schema)
