How do I send a list of booleans using the API

Options

Hey everyone,

I'm using the API to post to a table (currently using postman). This table has a field that is a list of booleans. It works if I just send "true" or "false", but when I try to send an array of them, I get the following error.

Here's the table schema incase I have something setup incorrectly there:

I'm new to Xano, but am very familiar with relational databases and APIs. Thanks in advance!

Tagged:

Best Answers

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Answer ✓
    Options

    @bellwoodsweb - you'll want to make sure your input is set up correctly - your input type should by a boolean list (array). It will need to be wrapped in [] and the input type must match correctly.

  • bellwoodsweb
    bellwoodsweb Member
    Answer ✓
    Options

    I figured it out, the issue was actually with postman, not Xano.

    Xano is expecting the request body to be form-data. When sending a form-data array in postman you have to seperate it into one line per array index like this:

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Answer ✓
    Options

    thanks for sharing!