Catalog/pm-critical-path

Calculators

Critical path duration (CPM) API

Compute the critical path through a task dependency DAG via a forward pass (longest path / earliest finish), returning project duration and the critical chain of task ids; rejects cycles and unknown dependencies. Answers 'what is the critical path','how long will the project take','which tasks drive the schedule','project duration from these dependencies'.

Price$0.01per request
MethodPOST
Route/v1/calc/pm-critical-path
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calcpmcritical-pathcpmscheduledependenciesdagduration
API URLhttps://x402.hexl.dev/v1/calc/pm-critical-path
Integration docs
Example request
{
  "tasks": [
    {
      "id": "A",
      "duration": 3
    },
    {
      "id": "B",
      "duration": 4,
      "dependsOn": [
        "A"
      ]
    },
    {
      "id": "C",
      "duration": 2,
      "dependsOn": [
        "A"
      ]
    },
    {
      "id": "D",
      "duration": 5,
      "dependsOn": [
        "B",
        "C"
      ]
    }
  ]
}
Example response
{
  "taskCount": 4,
  "projectDuration": 12,
  "criticalPath": [
    "A",
    "B",
    "D"
  ],
  "criticalPathLength": 3,
  "formula": "longest path through the dependency DAG (forward pass)"
}
Input schema
{
  "type": "object",
  "required": [
    "tasks"
  ],
  "properties": {
    "tasks": {
      "type": "array",
      "description": "Tasks, each {id, duration, dependsOn?}",
      "items": {
        "type": "object",
        "required": [
          "id",
          "duration"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "duration": {
            "type": "number"
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "examples": [
        [
          {
            "id": "A",
            "duration": 3
          },
          {
            "id": "B",
            "duration": 4,
            "dependsOn": [
              "A"
            ]
          },
          {
            "id": "C",
            "duration": 2,
            "dependsOn": [
              "A"
            ]
          },
          {
            "id": "D",
            "duration": 5,
            "dependsOn": [
              "B",
              "C"
            ]
          }
        ]
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}