Read a recorded payload
record_get_payloadFetch a session's recorded payload by handle, using JSONPath to extract only needed parts from large catalogs.
Instructions
Fetch a payload this session sent or received, by the handle reported in flow_get_status or flow_await. Payload bodies are held server-side and can be very large — a catalog runs to hundreds of kilobytes — so prefer a jsonpath slice (e.g. $.message.catalog.providers[*].id) over the whole body. The result says whether it was truncated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jsonpath | No | JSONPath to slice out instead of the whole body, e.g. $.message.catalog.providers[*].id. Use this on large catalogs. | |
| max_bytes | No | Truncate the serialised result past this many bytes. Defaults to 20000. | |
| payload_id | Yes | Payload handle, as reported by flow_get_status or flow_await. | |
| session_id | Yes | Session returned by session_create. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ack | No | The ACK/NACK exchanged for this call, when one was recorded. | |
| action | Yes | ||
| events | No | What has happened in this session since your last call — the participant's callbacks, steps sent automatically, refusals, form submissions. Attached to every session-scoped result and delivered exactly once, so read it here instead of polling. Absent when nothing happened. `more` above zero means call record_get_events for the rest. | |
| payload | Yes | The whole body, or — when `jsonpath` was given — the **list of matches** for it. A single match is therefore still wrapped in an array: `$.context.bpp_uri` on a string field reads `["https://…"]`. Read `jsonpath_matches` before concluding the value is itself a list. | |
| direction | Yes | 'outbound' if this mock sent it, 'inbound' if the participant did. | |
| timestamp | Yes | ||
| truncated | Yes | True when the body was cut short; narrow it with jsonpath. | |
| message_id | Yes | ||
| payload_id | Yes | ||
| size_bytes | Yes | Size of the full stored body. | |
| jsonpath_matches | No | How many nodes the `jsonpath` matched. Present only when one was given. `payload` is that many elements long, so the outer array is this count and not part of the stored value. |