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

Calculate Critical Path (Async)

Submit CPM calculation as async job (for large schedules >1,000 tasks).

This endpoint queues a CPM calculation job for background processing. Use GET /api/v1/jobs/{job_id} to poll for completion.

Tier Restrictions:

  • Demo/Free: Blocked (use sync endpoint ≤1,000 tasks)
  • Starter+: Allowed

Task Limits:

  • Starter: 2,000 tasks
  • Professional: 5,000 tasks
  • Enterprise: 50,000 tasks
  • Government: 100,000 tasks

Args: request: CPM calculation request api_key: API key for authentication

Returns: Job submission response with job_id and polling_url

Raises: HTTPException 402: Task count exceeds tier limit HTTPException 403: Async not available for tier (demo/free)

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
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "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
typestringRequiredDocumentation URL for the code: https://bellatorsi.com/problems/<slug>.
titlestringRequiredShort summary of the problem type.
statusintegerRequiredHTTP status code.
detailstringRequiredWhat went wrong in this request.
codestringRequiredStable UPPER_SNAKE machine code.

Schema

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

Authentication

  • API key required

Reference details

Operation ID
analysis_cpm_async
Section
Analysis
Tags
Analysis
Playground link
/playground?endpoint=%2Fapi%2Fv1%2Fanalysis%2Fcpm%2Fasync&method=post

Was this page helpful?

Your feedback helps us improve docs, reference pages, and Playground flows.

Topic: Calculate Critical Path (Async) · Page: /docs/api-reference/analysis_cpm_async

TermsPrivacyContact

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