Chain

A chain is a intermediate data type to enable complex template values. Chains also provide additional customization, such as marking values as sensitive.

To use a chain in a template, reference it as {{chains.<id>}}.

Fields

FieldTypeDescriptionDefault
sourceChainSourceSource of the chained valueRequired
sensitivebooleanShould the value be hidden in the UI?false
selectorJSONPathSelector to transform/narrow down results in a chained value. See Filtering & Queryingnull
content_typeContentTypeForce content type. Not required for request and file chains, as long as the Content-Type header/file extension matches the data

See the ChainSource docs for more detail.

Examples

# Load chained value from a file
username:
  source: !file ./username.txt
---
# Prompt the user for a value whenever the request is made
password:
  source: !prompt Enter Password
  sensitive: true
---
# Use a value from another response
# Assume the request recipe with ID `login` returns a body like `{"token": "foo"}`
auth_token:
  source: !request login
  selector: $.token