Skip to main content

External APIs Success Message Configuration

In this video you will understand how to configure the success message in External APIs. There are several scenarios where you may want to show the user the response of the API and a custom message when it returns the success.

For instance, creating a new record in any external datasource. Once the record is created successfully, you can show a success message to the user.

1. Create an External API

To begin you need to create an External API to update the record. These are modules that are used to create a Rest API such as GET API, POST API, DELETE, etc. Although you may also use an existing API too. APIs can be accessed from Settings → External API or from the top right hand-side. Then select the Create External API button. Give a name to your external API and copy the URL.

DrapCode Builder Collection Constructor

1.1 Persist the Collection

To map the data choose the Non Persistent Collection. This will not store the data locally. Then choose your collection from the dropdown. Now you need to map the API fields as they are in the collection form. You would need to use the same nomenclature as mentioned in the collection. This step defines how the data comes from the form and in what format it is sent to Xano. Then save your settings.

DrapCode Builder Collection Constructor

2. Create an Event

Create an event to update the API and add a confirmation popup message and it will indicate what exactly has to be done. Choose the Add Event option from the Events option in the left menu. Name the event and click the Create button.

DrapCode Builder Collection Constructor

2.1 Fill the Form

In the form that appears choose the API you have created. You can add a notification success message too, as you prefer.You can choose the optional save API response and Save your settings.

DrapCode Builder Collection Constructor

3. Bind the Event

You can bind the event to the collection. In the button that appears choose the Settings icon. Here choose the collection from the dropdown and in Event mention the name of the event you created to bind.

DrapCode Builder Collection Constructor

4. Update the Record

Now choose any record to update. Once you do so and Submit the details of the newly updated record it will display the Success message when you Reload the page.

DrapCode Builder Collection Constructor