The Fetch from URL module is used to fetch the contents of an internet resource from within your IVR application and interpret the results. It can be used to fetch files, post data, and integrate with REST webservices. The Fetch from URL module currently supports the HTTP and HTTPS protocols with a variety of methods: GET, POST, PUT, and DELETE. Fetched data in JSON, XML, CSV, and plaintext format can be interpreted and stored in variables or the Stack.
Other supported features of HTTP include custom headers, PUT data, and HTTP Basic Authentication.
Click this button to display the module menu
Click this toggler to change to a variable containing the fetch
URL for your Fetch from
URL module
Enter a fetch
URL in this textbox for your REST integration
Select one of the following methods from this drop-down menu: GET, POST, PUT, or DELETE
Select one of the following return types from this drop-down menu: text, JSON, CSV, or
XML
Enter the variable that contains your fetch
URL
Enter the POST parameter in this textbox
Click this toggler to change to a static textbox, where you would enter the value of your POST parameter
Enter a variable containing the value for your POST parameter
Enter a value for your POST parameter
Click this plus button to add another POST parameter to your module
Click this minus button to remove a POST parameter from your module
Click this toggler to change to a variable that contains the body that you want to send to your fetch
URL
Enter the body that you want to send to your fetch
URL in this textbox
Click this toggler to switch to static text, where you would enter the text that you want to send to your fetch
URL
Enter the variable that contains the body that you want to send to your fetch
URL
Selecting “One value” from this drop-down menu will extract a single value from your JSON object
Enter the location of the value you want to extract from your JSON object
Selecting “Object → Stack” from this drop-down menu will extract an object and place it onto one row in the stack (Note: you will need to use the
Get Row from Stack module to extract the values from this row)
Selecting “Array of objects → Stack” from this drop-down menu will extract an array of objects and place the objects as separate rows on the stack (Note: you will need to use the
Get Row from Stack module to extract the values)
Selecting “Array of values → Stack” from this drop-down menu will extract an array of values and place the values as separate rows onto the stack (Note: you will need to use the
Get Row from Stack module to extract the values, using
arrayItem as the fieldname.)
Select one option from the Separator drop-down menu: ”,”, ”;”, “|”, ”(space)”, ”(tab)”
Select one option from the Quotes drop-down menu: ”,'
Select an option from this drop-down menu to select one of the first three rows as a header or to choose no header and use a specified map
Enter a fieldname in this textbox to use for a CSV column
Enter a column number which this fieldname will correspond to
Click this add button to add another fieldname-column mapping
Click this remove button to remove a fieldname-column mapping
Select “1st matching node value” from this drop-down menu to extract the first matching
XML node's value into a variable
Enter an XPath in this textbox to select elements from the
XML document
Select “Matched node values → Stack” from this drop-down menu to return matched node values from your
XML and place them as rows onto the stack (Note: you will need to use the
Get Row from Stack module to extract the values, using
nodeValue as the fieldname.)
Select “Matched elems' attributes → Stack” from this drop-down menu to return matched element attributes from your
XML and place them as rows onto the stack (Note: you will need to use the
Get Row from Stack module to extract the values, with the attribute names as the fieldnames)
Select “Matched elems' children → Stack” from this drop-down menu to take each matching element, finding their child elements and placing the child elements' values onto the stack (Note: you will need to use the
Get Row from Stack module to extract the value, with the child elements' names as the fieldnames)
Click this toggler to use a variable for the username
Enter a username in this textbox
Click this toggler to use a variable for the password
Enter a password in this textbox
Enter an
HTTP header in this textbox
Click this toggler to use a variable for the header value
Enter a header value in this textbox
Click this add button to add another
HTTP header to your module
Click this remove button to remove an
HTTP header from your module
Click this toggler to use static text for your username
Enter a variable in this textbox for your username
Click this toggler to use static text for your username
Enter a variable in this textbox for your username
Click this toggler to use static text for your header
Enter a variable in this textbox for your header value
Error handling - Selecting this checkbox will enable additional nodes to handle error conditions. The “Server unavailable” node will be used when Plum Fuse is unable to fetch your URL from your server and the “Non-2xx response” node will be used when the fetch URL returns a non-2xx HTTP response.
Custom HTTP headers - Selecting this checkbox will enable you to enter custom HTTP header data to the fetch URL.
HTTP Basic Auth - Selecting this checkbox will enable you to enter a username and password to send to your fetch URL via HTTP Basic Authentication.
If your URL fetches data that cannot be interpreted as the selected content type, e.g., JSON/CSV/XML, unexpected results may occur. Please ensure the proper content type will always be returned by the webserver.
Please note that when using the option, “Array of values → Stack”, for JSON, you will need to specify your fieldname in the Get Row from Stack module as arrayItem. Also, please note that when using the option, “Matched node values → Stack”, for XML, you will need to specify the fieldname nodeValue.
For examples on how you could use all the various options of the Fetch from URL module (text, JSON, CSV, XML), please read the tutorial section on REST Webservice integration.