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.

Algorithm Steps:

  1. Dependency parsing & DAG construction
  2. Forward pass (calculate early dates)
  3. Backward pass (calculate late dates)
  4. Float calculation (total float, free float)
  5. 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

DCMA Check #12GAO BP-6PMBOK Critical Path Method

Request example

json
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.

FieldTypeRequiredDescription
tasksarray<unknown>RequiredList of tasks in the schedule
tasks[].idstringRequiredUnique task identifier
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).

Response example

json
json
{
  "score": 92,
  "grade": "A"
}

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
  • 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

TermsPrivacyContact

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