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
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | UUID | Yes | Organization ID |
Response
{
"total_cost": 247.50,
"trend_percent": -5.2,
"total_runs": 1247,
"avg_cost_per_run": 0.198,
"period_days": 30
}
Fields
| Field | Type | Description |
|---|---|---|
total_cost | float | Total cost in USD for the period |
trend_percent | float | % change from previous period |
total_runs | int | Number of workflow runs |
avg_cost_per_run | float | Average cost per run |
period_days | int | Time 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 Cost Trends
Get daily cost data for charting.
GET /api/v1/dashboard/trends
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
org_id | UUID | Yes | - | Organization ID |
days | int | No | 30 | Number 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
org_id | UUID | Yes | - | Organization ID |
days | int | No | 30 | Time period |
limit | int | No | 5 | Number 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
org_id | UUID | Yes | - | Organization ID |
limit | int | No | 10 | Number 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
| Status | Description |
|---|---|
queued | Waiting to run |
in_progress | Currently running |
completed | Finished running |
Conclusion Values
| Conclusion | Description |
|---|---|
success | All jobs passed |
failure | One or more jobs failed |
cancelled | Run was cancelled |
skipped | Run was skipped |
List Workflows
Get all workflows with filtering and pagination.
GET /api/v1/dashboard/workflows
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
org_id | UUID | Yes | - | Organization ID |
days | int | No | 30 | Time period |
repo | string | No | - | Filter by repository |
status | string | No | - | Filter by status |
sort_by | string | No | cost | Sort field |
sort_order | string | No | desc | Sort direction |
search | string | No | - | Search term |
Sort Options
| Field | Description |
|---|---|
cost | Total cost |
runs | Number of runs |
duration | Average duration |
name | Workflow 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
org_id | UUID | Yes | - | Organization ID |
days | int | No | 30 | Time 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:
| Runner | OS | Price/Minute |
|---|---|---|
ubuntu-latest | Linux (2-core) | $0.008 |
ubuntu-latest-4-cores | Linux (4-core) | $0.016 |
ubuntu-latest-8-cores | Linux (8-core) | $0.032 |
ubuntu-latest-16-cores | Linux (16-core) | $0.064 |
windows-latest | Windows (2-core) | $0.016 |
macos-latest | macOS (3-core) | $0.080 |
macos-latest-large | macOS (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:
| Plan | History Days |
|---|---|
| Free | 30 |
| Pro | 365 |
| Team | 365 |
Requests for data beyond your plan's limit will be capped automatically.
Next: Workflows Endpoint →