Skip to content
POST/api/v1/analysis/cpm

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.

Calculation: relationship type and lag are applied. Finish-to-start uses the predecessor finish. Start-to-start uses the predecessor start. Finish-to-finish and start-to-finish constrain the successor finish. Lag is added. A plain task id is finish-to-start with lag 0.

Early start is the maximum predecessor constraint, or 0 when there is no predecessor. Early finish is early start plus duration. Project duration is the maximum early finish. Late finish of a task with no successor is the project duration. Late start is late finish minus duration. Total float is late start minus early start. A task is critical when total float is 0. Free float is the slack to the earliest successor on the link that joins them, or total float when there is no successor. Criticality index is 1 on the critical path, and otherwise 1 minus total float divided by the largest total float.

Constraints use options.always_honor_constraints (default true). Must Start On and Must Finish On are hard. As Late As Possible is placed on its late start. A constraint date is a weekday offset from the earliest planned, actual, or baseline start. A start constraint is the start of its day (a weekend moves to the next working day); a finish constraint is the end of its day (a weekend moves to the working day before), so a driving constraint returns the date it names. Without one of those dates, the constraint date is not applied.

near_critical_paths holds up to five start-to-finish paths whose minimum total float is positive, lowest float first. The zero-float critical path is not in that list. project_finish_date and the per-task calendar dates are set only when a start date is present. Saturday and Sunday are not working days. A finish date is the last day the task works, as MS Project and P6 show it. Lost-time calendars are not applied.

Source: that arithmetic is this route's. EIA-748E Guideline 6 requires the schedule to describe the sequence of work and the task interdependencies. EIA-748E section 2.6 defines a network schedule as the basis for critical path analysis. Neither sentence states this procedure. GAO-16-89G practice 6 says the schedule should identify the path of longest duration through the sequence of activities. DCMA Check #12 is the slip test on POST /api/v1/health/dcma-14-point, not this calculation.

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

Critical path

The OpenAPI description is the overview. This page is the arithmetic the route returns.

Relationship type and lag are applied. A plain task id is finish-to-start with lag 0.

Quantity Calculation
Early start Maximum predecessor constraint, or 0 when there is no predecessor
Finish-to-start Predecessor early finish + lag
Start-to-start Predecessor early start + lag
Finish-to-finish Predecessor early finish + lag − duration
Start-to-finish Predecessor early start + lag − duration
Early finish Early start + duration
Project duration Maximum early finish
Late finish Project duration when there is no successor. Otherwise the minimum successor constraint for the link type
Late start Late finish − duration
Total float Late start − early start
Critical Total float is 0. The returned critical path is those task ids
Free float Slack to the successor on the joining link. Total float when there is no successor
Criticality index 1 when critical. Otherwise 1 − total float / the largest total float
Near-critical paths Up to five start-to-finish paths whose minimum total float is positive, lowest float first. The zero-float path is not included
Calendar dates Set when a planned, actual, or baseline start is present. project_finish_date and the per-task dates walk weekdays from the earliest of those starts. Saturday and Sunday are skipped. A finish date is the last day the task works: a 5-day task that starts Monday finishes that Friday. A zero-duration milestone falls on the day its predecessors finish. Lost-time calendars are not applied

options.always_honor_constraints defaults to true. Must Start On sets early start to the constraint's weekday offset. Must Finish On sets early start so the finish lands on that offset. As Late As Possible is placed on its late start. When the flag is false, Must Start On and Must Finish On become Start No Earlier Than and Finish No Earlier Than, and Start No Later Than and Finish No Later Than are ignored. A constraint date is not applied when the schedule has no start date.

The relationship-type filter changes the network-detail counts. It does not remove links from the forward or backward pass.

What was read, and what it does not say

EIA-748E Guideline 6 (revised February 2026): "Schedule the authorized work in a manner that describes the sequence of work and identifies task interdependencies required to meet the requirements of the program."

EIA-748E section 2.6 defines a network schedule as the basis for critical path analysis. The definition does not state this procedure.

GAO-16-89G practice 6: "The schedule should identify the program's critical path—the path of longest duration through the sequence of activities."

This route's critical set is total float of 0, not a separate longest-path search.

DCMA-EA PAM 200.1 section 4.12 is an intentional-slip test. It is not this calculation. That test is POST /api/v1/health/dcma-14-point.

The async route queues the same calculation.

Request example

json
json
{
  "options": {
    "include_network_details": true
  },
  "tasks": [
    {
      "duration_days": 5,
      "id": "T1",
      "predecessors": []
    },
    {
      "duration_days": 3,
      "id": "T2",
      "predecessors": [
        "T1"
      ]
    },
    {
      "duration_days": 7,
      "id": "T3",
      "predecessors": [
        "T1"
      ]
    },
    {
      "duration_days": 2,
      "id": "T4",
      "predecessors": [
        "T2",
        "T3"
      ]
    }
  ]
}

Built from the request schema: field names and types, not a sample run.

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.

FieldTypeRequiredDescription
optionsobjectOptionalOptions for CPM calculation.
options.include_network_detailsbooleanOptionalInclude network details (start/finish tasks, relationship types)
options.relationship_typesarray<string> | nullOptionalOptional relationship-type filter for network aggregation and details (FS, SS, FF, SF).
options.always_honor_constraintsbooleanOptionalWhen true, Must Start On and Must Finish On are hard. When false, those become Start No Earlier Than and Finish No Earlier Than, and Start No Later Than and Finish No Later Than are ignored. Same flag as schedule risk.

Response example

json
json
{
  "status": "pass",
  "metadata": {
    "task_count": 0,
    "endpoint": "string"
  }
}

Built from the response schema: field names and types, not a sample run.

Response fields from OpenAPI contract

This table is generated from the endpoint response schema in openapi.json.

FieldTypeRequiredDescription
statusstringRequiredTop-level result status — always present in every response.
metadataobjectRequiredAudit trail and processing context — always present, never null.
metadata.task_countintegerRequiredNumber of tasks in the submitted schedule
metadata.endpointstringRequiredEndpoint path e.g. /api/v1/health/score

Schema

json-schema
{
  "$ref": "#/components/schemas/BellatorResponse_CPMData_"
}

Authentication

  • API key required

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

TermsPrivacyContact

Schedule analysis guidance. Not legal advice. You remain responsible for contract and agency compliance.