This API will load surfboard product data into a website created with Toddle.

Top Action

You are able to call this API either at https://toddle-demo.fastgenapp.com/surfboards or customize the endpoint in the top action block of this route.

Database Query

We use the DB Query action to pull data from the database. The table surfboards will be autogenerated when you use this template.

SELECT name, description, price, image
FROM surfboards;

The query will return all available surfboards and their corresponding information including name, price and image.

Response

In the response body we will return the output of our DB query:

{
  "results": "{{steps.get-boards.outputs.Result}}"
}