---
title: "Get Item counts by classes"
method: GET
path: "/api/v2/teams/{team_slug}/items/class_counts"
tags: ["Items"]
---

# Get Item counts by classes

`GET /api/v2/teams/{team_slug}/items/class_counts`

Returns items counts (selected by provided filters) grouped by annotation classes.

## Path parameters

- `team_slug` string, required

## Query parameters

- `dataset_ids[]` union, required
  - CommonDatasetId[] — List of dataset IDs
  - 'all' — All dataset IDs.
  - string — [ DEPRECATED ] Comma seperated list of dataset IDs
- `has_comments` boolean — Controls whether to include only items with/without comments
- `select_all` boolean — For batch operation this filter has to be set to true if no other optional filter is provided.
- `item_path_prefix` string — Item's path prefix to match. This filter only matches on full path segments, it's not possible to match on e.g. '/some_path' with '/some' filter.
- `not_item_path_prefix` string — Item's path prefix to match. This filter only matches on full path segments, it's not possible to match on e.g. '/some_path' with '/some' filter.
- `item_paths[]` union
  - DatasetsV2FiltersItemPath[] — List of Item's path
  - string — [ DEPRECATED ] Comma separated list of Item's path
- `not_item_paths[]` union
  - DatasetsV2FiltersItemPath[] — List of Item's path
  - string — [ DEPRECATED ] Comma separated list of Item's path
- `item_ids[]` union
  - DatasetsV2FiltersItemId[] — List of Item's UUID
  - string — [ DEPRECATED ] Comma separated list of Item's UUID
- `not_item_ids[]` union
  - DatasetsV2FiltersItemId[] — List of Item's UUID
  - string — [ DEPRECATED ] Comma separated list of Item's UUID
- `item_names[]` union
  - DatasetsV2FiltersItemName[] — List of Item's name
  - string — [ DEPRECATED ] Comma separated list of Item's name
- `not_item_names[]` union
  - DatasetsV2FiltersItemName[] — List of Item's name
  - string — [ DEPRECATED ] Comma separated list of Item's name
- `item_name_prefix` string — Prefix of item's name
- `not_item_name_prefix` string — Prefix of item's name
- `item_name_contains` string — Partial item's name
- `not_item_name_contains` string — Partial item's name
- `workflow_stage_ids[]` union
  - DatasetsV2FiltersWorkflowStageId[] — List of Item's current workflow stage ID.
  - string — [ DEPRECATED ] Comma separated list of Item's current workflow stage ID.
- `not_workflow_stage_ids[]` union
  - DatasetsV2FiltersWorkflowStageId[] — List of Item's current workflow stage ID.
  - string — [ DEPRECATED ] Comma separated list of Item's current workflow stage ID.
- `types[]` union
  - DatasetsV2FiltersFileType[] — List of Type of files within the item
  - string — [ DEPRECATED ] Comma separated list of Type of files within the item
- `not_types[]` union
  - DatasetsV2FiltersFileType[] — List of Type of files within the item
  - string — [ DEPRECATED ] Comma separated list of Type of files within the item
- `statuses[]` union
  - DatasetsV2CommonGeneralStatus[] — List of General status of the Upload/Item. It considers processing status as well as workflow status and Item being archived/non-archived. Can be used instead of 'processing_status' and 'workflow_status' for simplicity. Item will be marked as 'complete' only if both workflow and processing is done.
  - string — [ DEPRECATED ] Comma separated list of General status of the Upload/Item. It considers processing status as well as workflow status and Item being archived/non-archived. Can be used instead of 'processing_status' and 'workflow_status' for simplicity. Item will be marked as 'complete' only if both workflow and processing is done.
- `not_statuses[]` union
  - DatasetsV2CommonGeneralStatus[] — List of General status of the Upload/Item. It considers processing status as well as workflow status and Item being archived/non-archived. Can be used instead of 'processing_status' and 'workflow_status' for simplicity. Item will be marked as 'complete' only if both workflow and processing is done.
  - string — [ DEPRECATED ] Comma separated list of General status of the Upload/Item. It considers processing status as well as workflow status and Item being archived/non-archived. Can be used instead of 'processing_status' and 'workflow_status' for simplicity. Item will be marked as 'complete' only if both workflow and processing is done.
- `annotation_class_ids[]` union
  - DatasetsV2FiltersAnnotationClassId[] — List of Item's class ID
  - string — [ DEPRECATED ] Comma separated list of Item's class ID
- `not_annotation_class_ids[]` union
  - DatasetsV2FiltersAnnotationClassId[] — List of Item's class ID
  - string — [ DEPRECATED ] Comma separated list of Item's class ID
- `current_assignees[]` union
  - WorkflowsV2ItemAssigneeId[] — List of Item's assignee ID
  - string — [ DEPRECATED ] Comma separated list of Item's assignee ID
- `not_current_assignees[]` union
  - WorkflowsV2ItemAssigneeId[] — List of Item's assignee ID
  - string — [ DEPRECATED ] Comma separated list of Item's assignee ID
- `assignees[]` union
  - WorkflowsV2ItemAssigneeId[] — List of Item's assignee ID
  - string — [ DEPRECATED ] Comma separated list of Item's assignee ID
- `not_assignees[]` union
  - WorkflowsV2ItemAssigneeId[] — List of Item's assignee ID
  - string — [ DEPRECATED ] Comma separated list of Item's assignee ID

## Response `200`

DatasetsV2.ItemManagement.ClassCountsResponse

- DatasetsV2ItemManagementClassCountsResponse — Returns item counts for each unique annotation class.
  - `simple_counts` DatasetsV2ItemManagementSimpleClassCount[], required
    - `annotation_class_id` integer, required
    - `dataset_id` integer, required
    - `item_count` integer, required

## Other responses

- `401` — Common.APIError
- `404` — Common.APIError
- `422` — Unprocessible Entity

---

[API](https://skmtc.dev/v7labs/apis/darwin.md) · [All operations](https://skmtc.dev/v7labs/apis/darwin/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/v7labs/darwin/revisions/526a5b6b4cdc/schema)
