API Call

Using this action, you can trigger the API Call defined in your project.

Prerequisites

Before you add this action, ensure you create an API call in your project.

Adding API Call action

Go to your project and follow the steps below to define the Action to any widget.

  1. Select the Widget (e.g., Button) on which you want to define the action.

  2. Select Actions from the Properties panel (the right menu), and click Open. This will open an Action Flow Editor in a new popup window.

  3. Click on the + Add Action.

  4. On the right side, search and select the API Call (under Backend/Database) action.

    1. Select the Group or Call Name from the dropdown.

    2. Optional: If your API call requires variables (e.g., auth token, query parameters, user id, etc.), pass their value by clicking on the + Variable button.

    3. The Action Output Variable Name helps you retrieve the response of an API call. By default, we set it to any random name. However, you can change it to a meaningful name if you wish to. (e.g., loginResponse).

    4. You can add a conditional action that checks if the API call is succeeded.

    5. If the API call is succeeded, all actions under the TRUE path will be executed. For example, navigate to the home page if the login is successful.

    6. If the API call is failed, all actions under the FALSE path will be executed. For example, showing a snackbar if the login is unsuccessful.

Last updated