[go: nahoru, domu]

Skip to content

Filter expression (Multi-Conditions) by HTTP REST API #5132

Answered by ganigeorgiev
imsgao asked this question in Q&A
Discussion options

You must be logged in to vote

The easiest way to rule out PocketBase issue is to try the filter in the Admin UI.

If you are constructing the request manually, the filter query parameter must be properly URL encoded, aka. in your case the valid query parameter should be:

?filter=title~%27abc%27%20%26%26%20created%3E%272022-01-01%27

Also note that the full-date time format is Y-m-d H:i:s.uZ, so a more precise date constraint could be:

// adjust the date depending on your requirement
?filter=title~'abc' && created>='2022-01-01 00:00:00.000Z'

// url encoded version:
?filter=title~%27abc%27%20%26%26%20created%3E%3D%272022-01-01%2000%3A00%3A00.000Z%27

For more detailed error messages you could also start the executable with

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@imsgao
Comment options

Answer selected by imsgao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5131 on June 24, 2024 15:15.