@shmaplex/xplant-sdk 0.7.0 is out: what's new →
xPlantAPI
API referenceSOPs and runs

List a run's evidence

Every piece of evidence posted against a run's steps — confirmations, scans, notes, instrument states and measurements — oldest first, a page at a time.

GET/api/v1/sop-runs/{id}/events
Scope read:sop_runs

Get an SOP run returns the first 50 with the run, and meta.events_next_cursor for the rest: pass it here as cursor. Or start here without a cursor to walk the whole trail. A cursor from another run's trail is refused. A page past the end of the trail is empty, with meta.next_cursor null, rather than an error.

See also: Run an SOP from a bench station.

Path parameters

NameTypeRequiredDescription
idstring (uuid)YesThe run's id.

Query parameters

NameTypeRequiredDescription
limitintegerNoPage size. Values above 200 are capped at 200. Default 50. From 1 to 200.
offsetintegerNoNumber of records to skip. Prefer cursor where a list offers it: an offset shifts when records are added ahead of it. Default 0. At least 0.
cursorstringNoContinue from the previous page: pass its meta.next_cursor unchanged, with the same filters. Treat it as opaque. Not combinable with offset. Up to 2048 characters.

Example

curl "https://app.xplantpro.com/api/v1/sop-runs/2a4c6e8b-1d3f-4b5a-a7c9-e1f3a5b7c9d1/events?limit=50" \
  -H "Authorization: Bearer $XPLANT_API_KEY"

Response

200 with { "ok": true, "data": … }. data is an array. To get the next page, pass meta.next_cursor back as cursor; it is null on the last page. See Pagination.

FieldTypeRequiredDescription
idstring (uuid)Yes—
runIdstring (uuid)YesThe run the evidence belongs to.
stepKeystringYesThe step it was recorded against — the stepId it was posted to.
eventTypestringYesconfirmed, scanned, skipped, note or device_state for a step event; measured for a measurement.
recordedAtstringYesWhen it happened: the recorded_at that was sent, or when xPlant received it.
payloadobjectYesThe detail sent with the event. For a measurement: metric, value, unit, and notes when there were any.
Response
{
  "ok": true,
  "data": [
    {
      "id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
      "runId": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
      "stepKey": "step-2",
      "eventType": "measured",
      "recordedAt": "2026-09-25T08:21:40+00:00",
      "payload": {
        "metric": "ph",
        "value": 5.7,
        "unit": "pH",
        "notes": "Initiation medium before pouring."
      }
    },
    {
      "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
      "runId": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
      "stepKey": "step-3",
      "eventType": "scanned",
      "recordedAt": "2026-09-25T08:30:00+00:00",
      "payload": {
        "code": "LINE-0412-J07"
      }
    }
  ]
}

The envelope can also carry meta:

FieldTypeRequiredDescription
next_cursorstring | nullYesPass as cursor to fetch the next page. null means this is the last page.
Response headerMeaning
X-RateLimit-LimitThe request budget this answer reports on, per minute: your key's or device token's (1,000) or your workspace's (3,000), whichever has fewer requests left. Left out when the budget could not be read.
X-RateLimit-RemainingRequests left in that budget this minute, after this one. 0 on a 429. A workspace's other keys spend its budget too, so this can fall faster than your own requests alone would.
X-RateLimit-ResetWhole seconds until that budget's minute ends and it is full again. Never more than 60.
X-Request-IdIdentifies this request. Include it when you contact support.

Errors

StatusCodeWhen
401UNAUTHORIZEDThe key is missing, malformed or revoked, or its owner is no longer a member of the workspace.
402PAID_PLAN_REQUIREDThe workspace's plan does not include the API. The full API is included with xPlant+ Teams and Enterprise; on Hobby and Pro Lab, keys can connect devices only.
403FORBIDDENThe key lacks a scope this operation requires, or its owner's current role in the workspace cannot use it — a key never does more than its owner can in xPlant. error names the scope, and for a role, the role it needs.
403DEVICE_TOKEN_NOT_ACCEPTEDA device token was sent; this operation needs a workspace API key.
404NOT_FOUNDNo run with this id exists in the key's workspace, or the run id is not a well-formed id.
422VALIDATION_ERRORBoth cursor and offset were sent; use one.
422INVALID_CURSORThe cursor is malformed, or came from a different list or different filters. Start again without it.
429RATE_LIMIT_EXCEEDEDToo many requests for this key, device token or workspace. Wait Retry-After seconds.
500SOP_RUN_QUERY_FAILEDThe run's evidence could not be read. Retry later.

Branch on code, never on the error text. See Errors.

On this page