---
title: "Gets the task counts for the specified job."
method: GET
path: "/jobs/{jobId}/taskcounts"
tags: ["Jobs"]
---

# Gets the task counts for the specified job.

`GET /jobs/{jobId}/taskcounts`

Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.

## Path parameters

- `jobId` string, required

## Query parameters

- `timeout` integer
- `api-version` string, required

## Headers

- `client-request-id` string, uuid
- `return-client-request-id` boolean
- `ocp-date` string, date-time-rfc1123

## Response `200`

A response containing the task counts for the specified job.

- TaskCounts
  - `active` integer, required
  - `running` integer, required
  - `completed` integer, required
  - `succeeded` integer, required
  - `failed` integer, required

## Other responses

- `default` — The error from the Batch service.

---

[API](https://skmtc.net/azure/apis/batchservice-2.md) · [All operations](https://skmtc.net/azure/apis/batchservice-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/batchservice-2/versions/dff38446805d/schema)
