Skip to main content

Dashboard Endpoints

The Dashboard API provides cost data, trends, and workflow analytics for your organization.

Get Cost Summary

Get an overview of costs for an organization.

GET /api/v1/dashboard/summary

Parameters

ParameterTypeRequiredDescription
org_idUUIDYesOrganization ID

Response

{
"total_cost": 247.50,
"trend_percent": -5.2,
"total_runs": 1247,
"avg_cost_per_run": 0.198,
"period_days": 30
}

Fields

FieldTypeDescription
total_costfloatTotal cost in USD for the period
trend_percentfloat% change from previous period
total_runsintNumber of workflow runs
avg_cost_per_runfloatAverage cost per run
period_daysintTime period in days

Example

curl -H "Authorization: Bearer $TOKEN" \
"https://api.cicosts.dev/api/v1/dashboard/summary?org_id=550e8400-e29b-41d4-a716-446655440000"

Get daily cost data for charting.

GET /api/v1/dashboard/trends

Parameters

ParameterTypeRequiredDefaultDescription
org_idUUIDYes-Organization ID
daysintNo30Number of days (max based on plan)

Response

{
"data": [
{
"date": "2024-01-15",
"cost": 12.47,
"runs": 45
},
{
"date": "2024-01-14",
"cost": 15.23,
"runs": 52
}
],
"period": {
"start": "2023-12-16",
"end": "2024-01-15",
"days": 30
}
}

Example

curl -H "Authorization: Bearer $TOKEN" \
"https://api.cicosts.dev/api/v1/dashboard/trends?org_id=uuid&days=7"

Get Top Workflows

Get the most expensive workflows.

GET /api/v1/dashboard/top-workflows

Parameters

ParameterTypeRequiredDefaultDescription
org_idUUIDYes-Organization ID
daysintNo30Time period
limitintNo5Number of results

Response

{
"workflows": [
{
"workflow_name": "CI/CD Pipeline",
"repo_name": "my-org/main-app",
"total_cost": 89.45,
"total_runs": 234,
"avg_duration_seconds": 245
},
{
"workflow_name": "Tests",
"repo_name": "my-org/api",
"total_cost": 45.20,
"total_runs": 567,
"avg_duration_seconds": 120
}
]
}

Example

curl -H "Authorization: Bearer $TOKEN" \
"https://api.cicosts.dev/api/v1/dashboard/top-workflows?org_id=uuid&limit=10"

Get Recent Runs

Get the most recent workflow runs.

GET /api/v1/dashboard/recent-runs

Parameters

ParameterTypeRequiredDefaultDescription
org_idUUIDYes-Organization ID
limitintNo10Number of results

Response

{
"runs": [
{
"id": "run-uuid",
"workflow_name": "CI/CD Pipeline",
"repo_name": "my-org/main-app",
"status": "completed",
"conclusion": "success",
"cost": 0.45,
"duration_seconds": 234,
"started_at": "2024-01-15T12:00:00Z",
"completed_at": "2024-01-15T12:03:54Z"
}
]
}

Status Values

StatusDescription
queuedWaiting to run
in_progressCurrently running
completedFinished running

Conclusion Values

ConclusionDescription
successAll jobs passed
failureOne or more jobs failed
cancelledRun was cancelled
skippedRun was skipped

List Workflows

Get all workflows with filtering and pagination.

GET /api/v1/dashboard/workflows

Parameters

ParameterTypeRequiredDefaultDescription
org_idUUIDYes-Organization ID
daysintNo30Time period
repostringNo-Filter by repository
statusstringNo-Filter by status
sort_bystringNocostSort field
sort_orderstringNodescSort direction
searchstringNo-Search term

Sort Options

FieldDescription
costTotal cost
runsNumber of runs
durationAverage duration
nameWorkflow name

Response

{
"workflows": [
{
"workflow_name": "CI/CD Pipeline",
"repo_name": "my-org/main-app",
"total_cost": 89.45,
"total_runs": 234,
"success_rate": 0.95,
"avg_duration_seconds": 245,
"last_run_at": "2024-01-15T12:00:00Z"
}
],
"pagination": {
"total": 45,
"page": 1,
"per_page": 20
}
}

Example

curl -H "Authorization: Bearer $TOKEN" \
"https://api.cicosts.dev/api/v1/dashboard/workflows?org_id=uuid&repo=my-org/main-app&sort_by=cost&sort_order=desc"

Get Workflows Summary

Get aggregate statistics for all workflows.

GET /api/v1/dashboard/workflows/summary

Parameters

ParameterTypeRequiredDefaultDescription
org_idUUIDYes-Organization ID
daysintNo30Time period

Response

{
"total_workflows": 45,
"total_runs": 1247,
"total_cost": 247.50,
"avg_success_rate": 0.92,
"most_expensive_workflow": "CI/CD Pipeline",
"most_active_repo": "my-org/main-app"
}

Runner Pricing

CICosts calculates costs based on GitHub's published pricing:

RunnerOSPrice/Minute
ubuntu-latestLinux (2-core)$0.008
ubuntu-latest-4-coresLinux (4-core)$0.016
ubuntu-latest-8-coresLinux (8-core)$0.032
ubuntu-latest-16-coresLinux (16-core)$0.064
windows-latestWindows (2-core)$0.016
macos-latestmacOS (3-core)$0.080
macos-latest-largemacOS (12-core)$0.120

Self-Hosted Runners

Self-hosted runners are tracked as $0.00 cost since they don't consume GitHub Actions minutes.


Plan Limits

History data is limited by plan:

PlanHistory Days
Free30
Pro365
Team365

Requests for data beyond your plan's limit will be capped automatically.


Next: Workflows Endpoint →