Skip to content

Fetch datasource

Fetch datasource is the easiest and fastest way to load external data within Toolpad app.

Working with fetch

As explained in the connections section you can either create a reusable connection or simply create a new query and put all connection details inline:

  1. Choose ADD QUERY in the Inspector on the right.

  2. Select fetch datasource and click CREATE QUERY:

    Fetch datasource
  3. You can modify all the basic configuration settings as described in queries section.

  4. In addition you can configuration following properties inline:

    Fetch configuration
    • HTTP method - by default GET is used, but we also support POST, PUT, DELETE, PATCH and HEAD methods.
    • url - is an endpoint to which requests will be made. We also have an option to dynamically generate url by using data binding. Parameters can be accessed by using query object inside url data binding editor.
    • parameters - allows us to use data bound properties which can then be used construct dynamic url value.
    Dynamic url
  5. Knowing that data comes in a different shapes we provide an easy way to transform response:

    • Simply enable option by checking Transform response.
    • Then modify which properties of data object should be returned as a final response.
    Transform response
  6. Once finished with configuration click SAVE to commit your changes and return to the canvas.