I’m trying to make a REST query to my models so I can implement a site search.
I have a page title:
The dev test page
When I query without a value I get all the pages:
https://cdn.builder.io/api/v3/content/my-model?apiKey=XXX&query.data.title.$regex=
Tried everything to filter, but the results always are empty:
https://cdn.builder.io/api/v3/content/my-model?apiKey=XXX&query.data.title.$regex=/dev/
Hi @manish-sharma ,
Thanks.
Still empty results, tried both .dev. and the JSON5 approach.
{"results": []}
Hello @chrischris,
Would you be able to help us with your builder Public API Key? You can find instructions for finding it at this link.
@manish-sharma absolutely, there you go:
c62b6400b6304daabf5f25c1107e9986
Thanks for helping with this.
I’ve just realised what the issue was, case sensitive as I was looking for “dev”, instead of “Dev”.
adding this to the query solved it:
&query.data.title.$options=i
Thanks, @manish-sharma, you are a life safer!