I am trying to retrieve a list of rows from a table. I am using plain javascript API in a browser, along the lines of “https://api.baserow.io/api/database/rows/table/mytableID/?user_field_names=true&Active=true”
But this doesn’t work.
My table has a boolean field called “Active” and some of the records are active, and some are not (based on placing the check in the “Active” box via the Baserow Grid UI. I don’t see an API search example in the API documentation. I was just wondering if there is an example out there I could look at.
P.S. I am authenticating properly. All rows are retrieved (JSON), regardless of whether they are “Active” or not.
First of all, welcome to the Baserow community. In order to filter the rows on the active state of a boolean field, you need to add a different query parameter. The filtering is the last part that doesn’t support the user_field_names=true, so you need to provide the field id. The URL including the right query parameters would look like this: https://api.baserow.io/api/database/rows/table/mytableID/?user_field_names=true&filter__field_YOUR_FIELD_ID__boolean=true. You must of course replace YOUR_FIELD_ID with the actual field id. You can find your field id in the API docs at REST API documentation // Baserow.
Let me know if it doesn’t work, I’m happy to help!