Analysis

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

post/api/v1/analysis/cpm

Request

  • Base URL: https://api.bellatorsi.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.bellatorsi.com/api/v1/analysis/cpm
  • Auth: none declared

Headers

x-api-keystring nullable
authorizationstring nullable
x-bellator-internal-dispatchstring nullable

Request body

Example request

{
  "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"
      ]
    }
  ]
}

Response

Successful Response

status'pass' | 'fail' | 'warning' | 'info' required

Top-level result status — always present in every response.

scorenumber nullable
grade'A' | 'B' | 'C' | 'D' | 'F'

Letter grade derived from a 0–100 score. Null on non-scoring endpoints.

summarystring nullable
breakdownobject nullable

Example response

{
  "data": {
    "critical_path": [
      "T1",
      "T3",
      "T4"
    ],
    "critical_path_length": 14,
    "dependency_count": 4,
    "network_details": {
      "dependency_count_filtered": 4,
      "dependency_count_total": 4,
      "finish_tasks": [
        "T4"
      ],
      "has_negative_float": false,
      "relationship_type_distribution": {
        "FF": 1,
        "FS": 2,
        "SS": 1
      },
      "relationship_types": [
        "FF",
        "FS",
        "SS"
      ],
      "start_tasks": [
        "T1"
      ]
    },
    "processing_metadata": {
      "algorithm_version": "v0.1.0",
      "processing_time_ms": 42.5
    },
    "project_duration": 14,
    "relationship_type_distribution": {
      "FF": 1,
      "FS": 2,
      "SS": 1
    },
    "task_count": 4,
    "tasks": {
      "T1": {
        "criticality_index": 1,
        "early_finish": 5,
        "early_start": 0,
        "free_float": 0,
        "is_critical": true,
        "late_finish": 5,
        "late_start": 0,
        "total_float": 0
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.