1. Inputs

Inputs are used to manage the Input configuration of an endpoint.

Inputs are parameters that are passed from the front-end that are then used in the Function stack when your API endpoint processes. Sometimes these inputs are also called query parameters.

For example, If you were creating an API endpoint to collect the entries from a signup form and store it in the database, it might look like this:

An Input can be created using the same Field Types that are used in the database. In this example this API Endpoint collects:

firstname as field type text

lastname as field type text

and email and field type email

Once these inputs are defined, you're able to use them anywhere in the Function stack.

How do inputs get passed into the Function stack?

In the Inputs section of the documentation, we passed firstname, lastname and email as input parameters. Let's see how they're used in a function in the function stack

As you can see, there's a single function called Add Record which adds a single record to a given table. In the above example, it's adding to the user table. Let's see how you would use the Inputs being collected in this function:

As you can see, the Add Record function shows the database table columns on the left-hand side, and you can map it to anything you want on the right. In this case, we want to map it to the firstname input we're collecting from the front-end, so we can select the input on the right and select the input we want to be mapped to the database column.

Testing your inputs

Once you have your functions mapped, you can always test your Inputs by using Run & Debug and you'll see a section where you can enter the inputs on the right:

Are my inputs limited in size?

Currently, at this time, we can not process more than 10KB in a single request unless you are on an Enterprise plan.

Renaming Inputs

If you want to rename one of your inputs, select it from the Inputs section. On the panel that opens, you can give your input a new name, and click the Save button.

If your input is referenced in other functions in your function stack, Xano will offer to populate this change for you. Click Update References to update the other places where your input is referenced, or choose Skip to leave them unchanged.

Last updated