I am struggling to search for a row using the search option on the url.
I have tried using a filter:
url = f"https://api.baserow.io/api/database/rows/table/{table_id}/?user_field_names=true&filter__field_474451__contains='Black Ice’"
but that returns:
Database: {“count”:0,“next”:null,“previous”:null,“results”:[]}
Please could you inform me of the correct syntax for search and filter. Thank you
petrs
2
Edit: The user_field_names=true
parameter is not supported, but it also shouldn’t cause any trouble. The filter how you wrote it seems correct.
Maybe you have a typo here 'Black Ice’
with the ’
character?
Sorted Search and Filter …
SEARCH URL:
url = f"https://api.baserow.io/api/database/rows/table/{table_id}/?user_field_names=true&search=Black Ice"
which will return a dictionary using the user field names.
FILTER URL:
url = f"https://api.baserow.io/api/database/rows/table/{table_id}/?user_field_names=true&filter__field_474451__contains=Black Ice"
which will also return a dictionary using the user field names.
My problem was the ’ ’ around the search and filter text. No need to enclose the text in quotes.