Call Rest API
The Call REST API action allows you to trigger a pre-configured API call directly from your app. It is typically used to send or retrieve data from a remote server based on user actions or events.
Refer to Define API Calls on how to define and then use.
✅ Common Use Cases
Submitting a form to a backend service
Fetching dynamic data to update the UI
Sending user input to an external system
⚙️ Default Behavior
By default:
Data Source
The API call is executed using the selected dataSource
Success / Error Handling
If onSuccess
or onError
flows are configured, they are triggered conditionally based on the response and success condition
Visual Feedback
No loading or error UI is shown automatically → use actions like Show Toast or Show Loading for user feedback
🛠️ How to Use
Add the action to a widget (e.g. on form submission or button click)
Choose Call REST API from the action list
Select the desired
dataSource
(Optional) Configure onSuccess and onError flows based on the API outcome
📦 Response Payload (Available in Expressions)
When the API call completes, the response is made available with the following fields:
body
The response body (commonly response.data
)
statusCode
The HTTP status code of the API response
headers
The response headers
You can access these in expressions or when assigning data to state variables.
💡 Example (Expression)
jsonGet(response.body, 'users[0].email')
This retrieves the email
value from the first user object in the API response body.
Last updated