Working with Ultra Input/Output Headers, Content, Parameters, and Status Codes

For ultra, this is all you need to work with headers, content, and url parameters.

Accessing a URL parameter from an Input request. All url parameters passed on the call in must be accessed in the incoming document and not like a traditional trigger. _paramName does not work.
All URL parameters will come in the “query” object of the input document and each distinct parameter will be represented by an array of the values passed in to those parameters. Most cases you’re only sending one value into one parameter so here in the SS I’m using the first array element 0.

Content and headers are easier. Your input document you access all incoming headers from the root, and all content from an object named “content”. Ignore the fact that I’m writing everything to content on the right side, that’s just something I’m doing in the pipeline. Please also note that ALL input headers will be cast to lowercase, even if they are sent in as uppercase. Your mapping must reflect this else you’ll have problems reading the headers.

Writing out responses is almost exactly the inverse. Minus the addition of status, body content back to the caller is inside of content. Headers are in root, you can send back custom headers. Status code is in a field called “status”

2 Likes