1. Browse the catalogue
targetId, the list is filtered
to what that connection can actually run, based on its OCPI version, its role and the
modules it advertises, and the response includes the target’s capability summary. Omit
targetId to see the full catalogue.
2. Preview a plan
A journey is described by a manifest: which template, against which target, on what clock. Previewing compiles it into an immutable plan and tells you whether it can run, before anything touches your partner.runAllowed: false means the preflight found a reason the
run cannot proceed (an unregistered target, a module the target does not advertise); the
plan spells out which.
3. Start the run, idempotently
202 means the run was admitted and is active work, not a verdict:
Idempotency-Key from CI. A repeated start with the same key returns the
original run with repeated: true instead of creating a second one, so a retried
pipeline step cannot double-charge your quota or hit your partner twice. The same key
with a different body answers 409.
The starts that do not admit a run:
4. Follow it to a verdict
?wait=<seconds> long-polls until the run reaches a terminal state or the wait expires.
The response carries status, the compiled plan, the current stage, the run’s verdicts
once they exist, and the two fields the next two sections explain: runIntegrity and
recoveryOptions.
What each status means
Run integrity is about our evidence, not their conduct
runIntegrity states how complete our record of the run is:
A degraded or invalid run is never a statement that your partner failed. Target failures
show up as failed verdicts with the exchange attached, exactly as in a conformance run.
Stream the events
Page through events with the sequence number as the cursor:meta.nextAfter tells you where to resume; pass it as the next after.
Or hold one connection open with server-sent events:
Last-Event-ID header set to the last id
you saw; the stream replays from there and closes itself when the run reaches a terminal
state.
Cancel a run
202: cancellation is a request, and the run winds down at the next safe point
rather than mid-exchange.
When a run pauses for a recovery decision
Sometimes the runner sends a mutating OCPI request and cannot learn whether it arrived: the connection died between dispatch and response. Resending it automatically could duplicate a session or a CDR on your partner’s side, so the tester never replays an uncertain mutation on its own. The run pauses asrecovery_required, holds its slot,
and asks you to choose.
Read the run to see the choices. They are computed by the server for that specific
uncertain action; only what the run read offers is valid:
Apply one with the
recoveryVersion from the same read:
409 means your recoveryVersion is stale: the run moved on since you read it,
perhaps because a colleague decided first. Re-read the run and decide against the current
state. This is deliberate; two people cannot apply conflicting decisions to the same
uncertain action.
Put it in CI
1 is “the target broke a rule”. Exit 2 is “we do not have an answer”, which
covers our own unavailability, a cancellation, and a pending recovery decision. A build
log should never turn “we do not know” into “your partner is broken”.