graph kpis
Calculate graph KPI snapshots from a local RDF export and optionally upload them to the WordLift API.
Usage
worai graph kpis calculate <file> [--website-host <host>] [--graph-host <host>] [--builtin-shape <name>] [--exclude-builtin-shape <name>] [--shape <file>] [--no-builtin-shapes] [--depth <n>] [--issue-level warning|error] [--shacl-workers <n>] [--output <file>]worai graph kpis payload <file> [--snapshot-date YYYY-MM-DD] [--website-host <host>] [--output <file>]worai graph kpis push <file> [--snapshot-date YYYY-MM-DD] [--website-host <host>] [--api-url <url>] [--timeout <seconds>] [--output <file>] [--details-output <file>]
Notes
- Requires
wordlift-sdk>=8.3.3. <file>accepts any graph format supported by the SDK graph loader, including Turtle and JSON-LD.calculatewrites the detailed KPI JSON, including graph totals, URL coverage, duplicate URL groups, rich snippet candidate counts, graph topology, and URL-rooted schema compliance.payloadwrites the numeric-only WordLift API snapshot payload for the selected date.pushcalculates the snapshot, resolves the selected account from the active profile API key, and uploads the dated snapshot to the WordLift API.--snapshot-datemust useYYYY-MM-DD; when omitted, the current UTC date is used.--website-hostscopes website URL coverage and duplicate URL KPIs to the customer website host.--graph-hostmarks graph dataset hosts as internal when computing broken internal edges; repeat it for multiple hosts.--depthcontrols subgraph expansion for URL-level SHACL compliance. The default is1.--issue-level warning|errorcontrols whether warnings count as compliance failures. The default iswarning.--no-builtin-shapesruns only shapes passed with--shape, useful for fast scheduled KPI gates.--shacl-workersparallelizes URL-level SHACL validation.--outputwrites the API payload forpayloadandpush; it writes the detailed KPI JSON forcalculate.--details-outputonpushwrites the detailed KPI JSON from the same calculation used for upload.
Examples
worai --profile acme graph kpis calculate ./acme-export.ttl --website-host www.example.com --output graph-kpis.jsonworai --profile acme graph kpis payload ./acme-export.ttl --snapshot-date 2026-06-29 --website-host www.example.com --output graph-kpi-payload.jsonworai --profile acme graph kpis push ./acme-export.ttl --snapshot-date 2026-06-29 --website-host www.example.com --shacl-workers 4 --output graph-kpi-payload.json --details-output graph-kpis.jsonworai --profile acme graph kpis push ./acme-export.ttl --snapshot-date 2026-06-29 --website-host www.example.com --no-builtin-shapes --shape profiles/_base/shapes/graph-kpis-url-roots.shacl.ttl --output graph-kpi-payload.json --details-output graph-kpis.json