Pipeline Playground

Load a pipeline
Load an order item then fetch its order. ${} subsitutes a value from the previous JSON response into the url. ${orderId} substitutes the orderId property.
Fetch an order item with its order. The sublist is executed in parallel. ~$this passes through the request as the response, and names it '$this'. jsonObject combines parallel messages into a single JSON object, the message body as the value of the property whose name is the message's name. The special name $this copies all the properties of the message body JSON into the output JSON. ${orderId} subsitutes the value of the orderId property from the previous JSON response into the url. ~order names this message 'order'.
Fetch an order and all its items. ${} subsitutes a value from the previous JSON response into the url. ${items[]} takes the array value of the items property and substitutes each element in turn making a list of urls which are then called in parallel. By default, each is assigned a name which is the index in the array of the element
Fetch a list of names of an order's items. ${} subsitutes a value from the previous JSON response into the url. ${items[]} takes the array value of the items property and substitutes each element in turn making a list of urls which are then called in parallel. By default, each is assigned a name which is the index in the array of the element. jsonObject then combines these into a single object, which because the properties are index numbers can be treated as an array. Then the JSON object represents a data transform. It creates an object with one property, orderItems. The value of that property is got by running an expressionMap function whose arguments are $this and item. The first argument $this takes the whole of the input data as an array. The second argument is a string expression in a restricted form of Javascript where any variable given is a property of the input data object, whicch in this case is each element in the array in turn. So this expression simply gets the item property of the array element.
Use a json list of files to download them as a zip. ${} subsitutes a value from the previous JSON response into the url. ${Items[]} takes the array value of the Items property and substitutes each element in turn making a list of urls which are then called in parallel. Here each one is given a name which is a url substitution pattern based on the url that the request was made to. In this case, $<0 takes the 0th from the right i.e. the final segment of the url as the name.
Download a file as a JSON object with metadata and a property with the file encoded in base64. The sublist is executed in parallel. ~$this passes through the request as the response, and names it '$this'. ${} subsitutes a value from the previous JSON response into the url. ${filename} substitutes the filename property from the previous request JSON. jsonObject combines parallel messages into a single JSON object, the message body as the value of the property whose name is the message's name. The special name $this copies all the properties of the message body JSON into the output JSON. A named message body which isn't JSON (in this case, the svg file) is encoded to a string directly if it is text, but in this case it is considered a binary file so it is encoded to base64, ready to be used as part of a data url.
Stream a file from one url to another. /staging/img/crocus.jpg could be any source url and /production/img/crocus.jpg could be any url you can post a file to.

This is a playground for the free, beta Cloudflare Workers service at https://external-pipeline.r-s.workers.dev. See the blog post on External Pipeline for more information and docs.