Curl filter request with space / special characters

Hey

Just a short info, if you use curl and jq for some quick bash shell shenanigans.

If you having trouble pushing a query to baserow with spaces/special characters inside the query - which will break your query request - you should use the -G --data-urlencode option of curl.

Example :
curl -X GET -H "Authorization: Token TOKENDUMMYABCDEFGH" -G --data-urlencode "filter__field_1234__equal=${VARIABLE}" "https://baserowsystem.local/api/database/rows/table/500/
(…with ${VARIABLE} containing some unfriendly characters :wink: )

Please take note, that the query-part is now separated from the request-URL; and the ‘?’ is no longer necessary.

1 Like

Thanks for sharing this @ArgH :blue_heart: