---
title: "Count traces"
method: POST
path: "/orchestration/traces/count"
tags: ["Orchestration - Traces"]
---

# Count traces

`POST /orchestration/traces/count`

Count orchestration traces matching the filter.

## Request body

- object — Request body schema.
  - `workflowUuid` string, uuid — When set, restrict traces to this workflow. Omit to search across workflows in the workspace.
  - `statuses` string[] — Filter traces by their derived status (`pending` if any span anywhere in the trace is still pending, `error` if any of the root run's spans has errored, otherwise `success`).
  - `startedAfter` string, required — Include traces whose first execution started after this timestamp (ISO string). Required.
  - `startedBefore` string — Include traces whose first execution started on or before this timestamp (ISO string).

## Response `200`

Successful response

- object
  - `count` number, required — Number of traces matching the filter.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/getcargo/apis/cargo-api.md) · [All operations](https://skmtc.net/getcargo/apis/cargo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getcargo/cargo-api/revisions/1d5a19e01d83/schema)
