---
title: "Count spans"
method: POST
path: "/orchestration/spans/count"
tags: ["Orchestration - Spans"]
---

# Count spans

`POST /orchestration/spans/count`

Count orchestration execution spans

## Request body

- object — Request body schema.
  - `workflowUuid` string, uuid — When set, restrict spans to this workflow. Omit to search across workflows in the workspace.
  - `userUuid` string, uuid — User identifier to filter by.
  - `batchUuid` string, uuid — Batch identifier to filter by.
  - `runUuid` string, uuid — Run identifier to filter by.
  - `recordId` string — Record ID to filter by.
  - `recordTitle` string — Record title to filter by (SQL ilike).
  - `recordTitleOrId` string — Match record id or record title (each SQL ilike); same pattern as run list.
  - `parentRunUuid` string, uuid — Parent run identifier to filter by.
  - `parentNodeUuid` string, uuid — Filter by parent node UUID on the run.
  - `parentAgentUuid` string, uuid — When set, restrict spans to rows whose parent agent matches this UUID.
  - `nodeUuid` string, uuid — Node identifier to filter by.
  - `nodeKind` 'native' | 'connector' | 'tool' | 'agent' — Filter by node kind (native, connector, tool, agent).
  - `nodeSlug` string — Filter by workflow node slug (exact match).
  - `nodeIntegrationSlug` string — Filter by connector integration slug (exact match).
  - `nodeConnectorUuid` string, uuid — Filter by connector UUID.
  - `nodeActionSlug` string — Filter by node action slug (exact match).
  - `nodeToolUuid` string, uuid — Filter by tool node UUID.
  - `nodeAgentUuid` string, uuid — Filter by agent node UUID.
  - `nodeReleaseUuid` string, uuid — Filter by release UUID referenced on the node.
  - `executionTitle` string — Filter by execution title (SQL ilike).
  - `executionStatuses` string[] — Execution statuses to include.
  - `executionStartedAfter` string, required — Include spans whose execution started after this timestamp (ISO string). Required.
  - `executionStartedBefore` string — Include spans whose execution started on or before this timestamp (ISO string).

## Response `200`

Successful response

- object
  - `count` number, required — Number of spans 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)
