Calculate Critical Path
Calculate Critical Path Method for a schedule.
This endpoint performs two-pass CPM calculation (forward + backward pass) to determine critical path, project duration, and task timing.
Algorithm Steps:
- Dependency parsing & DAG construction
- Forward pass (calculate early dates)
- Backward pass (calculate late dates)
- Float calculation (total float, free float)
- Critical path identification
Standards Compliance:
- DCMA Check #12: Critical Path Test
- GAO BP-6: Maintain Valid Critical Path
- PMBOK 6.5.2.2: Critical Path Method
- AACE RP 27R-03: Schedule Flexibility
Task Limits:
- Minimum: 1 task
- Maximum: 10,000 tasks (synchronous processing only)
- For larger schedules, use async health score API
Dependency Format:
- Simple: ["T1", "T2"] (assumes FS with zero lag)
- Rich: ["T1FS+2 d", "T2SS-1 d"] (relationship type + lag)
Response Time:
- 1-100 tasks: <10ms
- 101-500 tasks: <25ms
- 501-1,000 tasks: <50ms
- 1,001-5,000 tasks: <200ms
- 5,001-10,000 tasks: <500ms
Args: request: CPM calculation request with tasks and options api_key: API key for authentication (injected) protection: Bot detection and rate limiting results
Returns: CPMResponse with critical path, task timing, and optional network details
Raises: HTTPException 400: Invalid request (malformed JSON, validation errors, cycles) HTTPException 401: Invalid API key HTTPException 429: Rate limit exceeded HTTPException 500: Internal server error
Request example
json{
"tasks": [
{
"id": "T1",
"duration_days": 5
}
]
}Request fields from OpenAPI contract
Required fields and the optional fields that change this call are listed here. The shared task model stays on the task schema guide.This table is generated from the endpoint schema in openapi.json.
| Field | Type | Required | Description |
|---|---|---|---|
| tasks | array<unknown> | Required | List of tasks in the schedule |
| tasks[].id | string | Required | Unique task identifier |
| options | object | Optional | Options for CPM calculation. |
| options.include_network_details | boolean | Optional | Include network details (start/finish tasks, relationship types) |
| options.relationship_types | array<string> | null | Optional | Optional relationship-type filter for network aggregation and details (FS, SS, FF, SF). |
Response example
json{
"score": 92,
"grade": "A"
}Response fields from OpenAPI contract
This table is generated from the endpoint response schema in openapi.json.
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | Required | Top-level result status — always present in every response. |
| metadata | object | Required | Audit trail and processing context — always present, never null. |
| metadata.task_count | integer | Required | Number of tasks in the submitted schedule |
| metadata.endpoint | string | Required | Endpoint path e.g. /api/v1/health/score |
Schema
{
"$ref": "#/components/schemas/BellatorResponse_CPMData_"
}Authentication
- API key required
- x-api-key header
Reference details
- Operation ID
- analysis_cpm
- Section
- Analysis
- Tags
- Analysis
- Playground link
- /playground?endpoint=/api/v1/analysis/cpm&method=post
Was this page helpful?
Your feedback helps us improve docs, reference pages, and Playground flows.
Topic: Calculate Critical Path · Page: /docs/api-reference/analysis_cpm