API Reference

Parse Primavera P6 XER files to structured JSON. One endpoint, one HTTP call, no Oracle license required.

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer xer_<your_key>

Get a free API key (50 parses, no card) at p6parser.com/#pricing. Keys for paid plans are delivered instantly after Stripe checkout.

Base URL

https://p6parser.com

Errors

StatusMeaning
200Success — JSON body returned
400Bad request — missing file body or malformed XER
401Missing or invalid API key
403Call limit reached — upgrade or wait for reset
422File is not a valid XER — check encoding or file type
429Rate limited — slow down requests
500Server error — contact support@p6parser.com

Error responses always include a JSON body: { "error": "message" }

POST /parse

POST https://p6parser.com/parse

Send a raw XER file as the request body. Returns a structured JSON object containing the parsed schedule data. The file is parsed in memory and never stored.

Query parameters

ParameterTypeDefaultDescription
raw_hours boolean false Return duration fields in hours instead of days. Developer+
dcma boolean false Run the DCMA 14-Point Schedule Assessment and include results in dcma. Professional+
baseline boolean false Cross-reference activities against the baseline project in the same XER file. Adds baseline_start, baseline_finish, baseline_duration_days, variance_start_days, variance_finish_days to each activity. Business+

Request

curl -X POST "https://p6parser.com/parse?dcma=true" \
  -H "Authorization: Bearer xer_your_key_here" \
  --data-binary "@/path/to/schedule.xer"
The request body must be the raw binary content of the XER file. Set no Content-Type header — the API detects encoding (UTF-8 and CP1252) automatically.

export_info

{
  "export_info": {
    "version": "19.12",        // P6 version that exported this file
    "export_date": "2024-03-15",  // date of export (ISO 8601)
    "currency": "USD",           // currency code
    "timezone": "America/New_York"
  }
}

schedule_summary

{
  "schedule_summary": {
    "total_activities":    847,
    "critical_activities": 112,
    "percent_complete":    34.2,
    "data_date":          "2024-03-15T07:00:00Z",
    "planned_start":      "2024-01-15T07:00:00Z",
    "planned_finish":     "2026-06-30T17:00:00Z"
  }
}

activities[]

{
  "activity_id":              "A1010",
  "name":                     "Excavation",
  "wbs_path":                 "BRIDGE.FOUNDATION.EXCAVATION",
  "status":                   "TK_Active",
  "start":                    "2024-03-01T07:00:00Z",
  "finish":                   "2024-03-15T17:00:00Z",
  "actual_start":             "2024-03-01T07:00:00Z",
  "actual_finish":            null,
  "original_duration_days":  10,
  "remaining_duration_days": 3,
  "percent_complete":        70,
  "total_float_days":        0,
  "free_float_days":         0,
  "is_critical":             true,
  "is_longest_path":         true,
  "calendar_name":           "Standard 5-Day",
  "constraint_type":         null,
  "constraint_date":         null,
  "predecessors": [{ "activity_id": "A1000", "type": "FS", "lag_days": 0 }],
  "successors":   [{ "activity_id": "A1020", "type": "FS", "lag_days": 0 }],
  "resources": [{
    "resource_id":   "CREW_A",
    "name":          "Crew Alpha",
    "budgeted_cost": 12500,
    "actual_cost":   8750,
    "budgeted_qty":  80,
    "actual_qty":    56
  }],
  // Baseline fields — Business+ tier, ?baseline=true
  "baseline_start":          "2024-02-26T07:00:00Z",
  "baseline_finish":         "2024-03-12T17:00:00Z",
  "baseline_duration_days":  10,
  "variance_start_days":     3,   // positive = behind schedule
  "variance_finish_days":    3
}

wbs[]

{
  "wbs_id":       "WBS-003",
  "name":         "Foundation",
  "full_path":    "BRIDGE.FOUNDATION",
  "parent_wbs_id": "WBS-001"
}

dcma — Professional+ (?dcma=true)

Runs the DCMA 14-Point Schedule Assessment. See the DCMA guide for details on each check.

{
  "dcma": {
    "overall_score":  78,
    "overall_passed": false,
    "checks": [
      {
        "check_id":  1,
        "name":      "Logic",
        "passed":   true,
        "percent":  2.1,
        "threshold": 5,
        "count":    18,
        "total":    847,
        "failing_activity_ids": ["A1055", "A2010"]
      }
      // ... 13 more checks
    ]
  }
}

cURL

curl -X POST "https://p6parser.com/parse" \
  -H "Authorization: Bearer YOUR_KEY" \
  --data-binary "@schedule.xer" \
  | python3 -m json.tool

Python

import requests

with open("schedule.xer", "rb") as f:
    r = requests.post(
        "https://p6parser.com/parse",
        headers={"Authorization": "Bearer YOUR_KEY"},
        params={"dcma": "true"},
        data=f.read(),
    )
    r.raise_for_status()

data = r.json()
critical = [a for a in data["activities"] if a["is_critical"]]
print(f"Critical: {len(critical)} / {data['schedule_summary']['total_activities']}")

Node.js

const fs = require("fs");

const res = await fetch("https://p6parser.com/parse?dcma=true", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.XER_API_KEY}` },
  body: fs.readFileSync("schedule.xer"),
});
const data = await res.json();
console.log(data.dcma.overall_score, data.dcma.overall_passed);