Add a Call REST Action
A Call REST action is used to call a REST API endpoint to create, update, delete or display records.
After you add a Call REST action, you need to specify the endpoint for the request. Depending on the endpoint, you might also need to provide it with input parameters to perform the request, such as an ID to identify a record.
This table lists the parameters that you typically need to provide for a Call REST action, for each type of endpoint. For a code example of a call to each endpoint type, see Call REST in the Oracle Visual Builder Page Model Reference. Regarding the action's returned result, it's assigned to the automatically generated variable set for the Store Result In property.
Type of Endpoint | Use | Typical Requirements |
---|---|---|
POST | Add a new record. |
|
GET | Get one or many records. |
To get single record, provide the record's ID: In the Input Parameters section of the Properties pane, provide the record's ID using the input parameter for the record's ID. |
DELETE | Delete a record. |
|
PATCH | Update a record. |
|
To use a Call REST endpoint:
The object returned by the Call REST action is automatically named and shown by the Store Result In property.
If the underlying REST API request returns a status code, the error object is returned for you to handle the error yourself, otherwise an auto-generated error notification is shown. For details about error handling and the return object, see Call REST in the Oracle Visual Builder Page Model Reference.
Service Definitions
To change the details of a service connection endpoint, such as its path, method (example: GET, PUT, HEAD) or the schema of the request or response, see Edit a Service Connection.
Transform Functions
For details about creating JavaScript functions that modify the format of data and parameters for REST requests and modify the format of data from Rest responses, see Add Transforms.