Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

Xano as a data source ​

You can create a WeWeb table that retrieves its data from a Xano GET endpoint. Xano stays the place where the data lives, and WeWeb gives you views you can bind to your pages.

Each table is linked to one endpoint. To show a list of jobs and the details of a single job, for example, create two tables: one on GET /job, one on GET /job/{job_id}.

Create a Xano table ​

  1. Go to the Data & API tab, then open the Tables subtab.
  2. Click Add Table.
  3. In Select a data source, choose Xano.
  4. Choose the Xano connection you want to use.
  5. Select the API Group.
  6. Select the Endpoint (GET). Only GET endpoints are listed.
  7. Fill in the default values the endpoint needs:
    • URL Params: The parts of the path in curly braces, such as {job_id}. Shown only if the endpoint has some.
    • Query Parameters: The inputs of the endpoint. Shown only if the endpoint has some. WeWeb fills in the default values set in Xano.
    • Headers: Extra headers sent with every request of this table.
  8. Set the Name of the table, and choose whether to keep Fetch all views via the frontend (advanced) on (see below).
  9. Finish setup.

WeWeb also creates a first view, with a view parameter for each query parameter of the endpoint. You can change their values in the view, or bind them to something on your page.

Where the data is retrieved ​

The Fetch all views via the frontend (advanced) toggle decides who calls Xano:

  • On (the default for Xano): the browser calls Xano directly. If the user is signed in with Xano, their session is sent automatically.
  • Off: your WeWeb server calls Xano. No Xano session is sent, so the endpoint must be public, or the view must send its own key or token in Headers.

Pick the option that matches your setup. Learn more about the three ways to use Xano →

SENDING THE USER'S TOKEN FROM THE SERVER

If Xano is your Authentication System and your table is fetched by the WeWeb server, add an Authorization header to the view, and bind its value to Bearer followed by the access token of the current session. Do this on the view: the Headers of the table can't be bound.

Make a view dynamic ​

A view can change the URL Params, Query Parameters, and Headers of its table. Its values are combined with the table defaults, and the view wins when both set the same field.

To show different data depending on what the user does (a search, a filter, a page number), bind those fields to view parameters, then set the parameters from your page. For example, bind the search query parameter to a search view parameter, and update it from a search input.

Query parameters with an empty value are not sent to Xano.

ONLY THE INPUTS OF YOUR ENDPOINT WORK

A Xano endpoint only accepts the inputs you added to it in Xano. Anything else is ignored, including page or per_page if the endpoint doesn't declare them. If you need a new filter, add the input to the endpoint in Xano first.

Pagination ​

Xano manages its own pagination. The WeWeb pagination tools (the Change page and Load more actions, and the Paginator element) don't work with Xano tables.

Instead, page through results with the inputs your endpoint exposes, usually a page number:

  1. In Xano, make sure your endpoint accepts a page input and returns paginated results.
  2. In the view, bind that input to a view parameter, for example page.
  3. On your page, add Previous and Next buttons that change the page view parameter.

When the endpoint returns Xano's paginated format (a list of items with a curPage value), WeWeb uses items as the rows of the view, and puts the rest in the view metadata:

MetadataWhat it contains
curPageThe current page number
nextPageThe next page number, empty on the last page
prevPageThe previous page number, empty on the first page
itemsTotalThe total number of rows
itemsReceivedThe number of rows on this page
pageTotalThe total number of pages
offsetHow many rows were skipped before this page

Use them to show "Page 2 of 5", or to hide the Next button on the last page.

If the endpoint returns anything else, WeWeb uses the response as it is, and the metadata stays empty.

What the view data looks like ​

The data of a view is what your endpoint returns:

  • A list endpoint gives you a list of rows.
  • A single-record endpoint, such as GET /job/{job_id}, gives you one object. Bind its fields directly (for example title), not the first item of a list.

CONTINUE LEARNING

Tables retrieve data. To create, update, or delete records in Xano, or to upload files, call your endpoints from a workflow.

Call Xano from workflows →