For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • API Reference
      • GETWorkspace Runs Stats
      • GETWorkspace Workflows Stats
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referenceworkspace-aggregates

Workspace Workflows Stats

GET
/api/v1/workspace/workflows/stats
GET
/api/v1/workspace/workflows/stats
$curl https://api.onepin.ai/api/v1/workspace/workflows/stats \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "data": {
3 "total": 125,
4 "draft": 20,
5 "running": 45,
6 "completed": 50,
7 "failed": 10,
8 "paused": 0
9 },
10 "meta": {
11 "request_id": "a3f47b9e-8c2d-4f1a-9b7e-2d5f6c8a9e12",
12 "timestamp": "2024-04-27T14:22:00Z"
13 }
14}
Aggregate workflow counts grouped by derived WorkflowListStatus across the workspace.
Was this page helpful?
Previous

List Members

Next
Built with

Authentication

AuthorizationBearer
Clerk JWT token

Headers

X-Workspace-Idstring or nullOptional

Query parameters

fromdatetime or nullOptional

Filter workflows by created_at >= this ISO datetime.

todatetime or nullOptional

Filter workflows by created_at <= this ISO datetime.

Response

Successful Response
dataobject

Workflow counts grouped by derived WorkflowListStatus for a workspace.

Bucket coverage (V1, by design): total >= draft + running + completed + failed + paused. Workflows whose latest run is cancelled map to no bucket because the spec exposes only the 5 WorkflowListStatus values. The UI must use total for the headline count, not the sum of buckets.

paused is always 0 (spec Non-Goal — UI exposes the bucket for forward compatibility).

metaobject

Errors

422
Unprocessable Entity Error