After creating data buckets, you can use them through the data
templating helpers or by directly referencing them in a route response.
Two helpers are available: data
and dataRaw
. They work in a similar way to the body
and bodyRaw
helpers.
They can be used anywhere templating helpers are supported: body editor, files, headers keys and values, etc., and allow you to partially reuse your data bucket content and compose dynamic responses body easily.
Both helpers support retrieving the data bucket by its unique ID or name. It also allows you to retrieve only part of the data bucket using an optional object path:
Copy
💡 Retrieving data at a specific object path requires that the data bucket content is a valid JSON.
Head over to the data helpers' documentation to see more examples.
A data bucket can also be directly linked to a route response. Linking a data bucket will serve the generated data bucket content "as-is".
To link a data bucket to a route response, choose "Data" in the body selector and select your data bucket.