Web Request Quick Action
-
Classic Action Designer: Web Request Quick Action
You can use web requests to update fields in your business objects.
Use the Web Request action when you need to customize and define inputs. The Web Request Quick Action uses open APIs to communicate with web servers, making it a flexible data gathering tool.
About the Web Request Quick Action
Use the Web Request Quick Action block to gather data and update fields in one step.
Parameters
To access the parameters select the Action Block to display them in the Settings pane.
Action Block Settings
General Settings
Block Label: A unique name for the block. This is useful to identify each action when you have more than one of the same action block added or cloned in the design area.
- Method:
- GET: Gathers data from a resource on the server.
- POST: Sends data to the server to create or update a resource. Multiple POST requests will result in compounded changes to the resource.
- PUT: Sends data to the server to create or update a resource. Multiple PUT requests will result in the same response with every request.
- PATCH: Applies partial modifications to a resource.
- DELETE: Deletes the specified resource.
- URL: The target of your web request.
- Body: Enter the payload you are sending with your web request.
- For example, $('{"Status":"' + Status + '", "Subject":"' + Subject +'", "Description":"' + Symptom + '"}').
Header Settings
The header settings contain metadata in key-value pairs that are sent along with HTTP requests. A request header is sent to the web server and contains information and instructions for the resource to respond to the request. You can find useful information on using HTTP headers at https://blog.postman.com/what-are-http-headers/. You can specify one or more header key-value pairs in the Header Settings. See Example of Header Settings for typical examples of defining the header settings.
- Click Header Settings to open the workspace in the Graphical Action Designer.
- Enter the required Header Key and Header Value pair.
- Click the + icon to add more pairs.
Example of Header Settings
In this example, we define the header settings to pass an API key to a web server.
Typically, this may be used to obtain data from the server, the header value API key being passed to the server as authorization to obtain the data.
1.Set the Web Request action's Method field to 'GET', as we want to gather data from a resource on the server.
2.Enter tenant URL along with resource location in the URL field.
For example, https://<tenant-url>/api/odata/businessobject/incidents('$(RecId)').
3.Enter "Authorization" for the Header Key, and the API key for the Header Value.
4.Click Add Header to add a second header key and value row.
5.Enter "Content-Type" for the Header Key, and application/json for the Header Value.
This indicates that the request body contains JSON data.
Response Settings
- Ignore Certificate Errors: Check this box to have the Web Request Quick Action ignore certificate errors (such as an expired certificate error) and continue processing the remaining steps in the Quick Action.
- Store Response Code As: Creates and populates a variable to store the response code for use in subsequent action steps.
- Store Response Body As: Creates and populates a variable to store the response body for in subsequent action steps.
- Store Response Headers As: Creates and populates a variable to store the response header for in subsequent action steps.
Click Save to commit your settings.
Start Block Settings
These settings are accessed by selecting the Start Block, refer to Start Block Settings.