Question,
In the content’s ui, is there a way to search if we have the exact id
(captured from the API)?
Looks like the meta.id
field is not available to be used in queries:
Thanks!
Question,
In the content’s ui, is there a way to search if we have the exact id
(captured from the API)?
Looks like the meta.id
field is not available to be used in queries:
Thanks!
It is possible, but not recommended, because it is faster to use the dedicated endpoints for that. But you can just use the URL.
Thanks, @sebastian - could you please share an example of how to search for an ID, I mean, URL example?
You can also use OData queries directly in the UI:
$filter=id eq 'YOUR_ID'
should work.
For the normal API you should of course use the normal endpoint:
/api/contents/my-app/my-schema/my-id
You can also query multiple ids with
/api/contents/my-app/my-schema/?ids=123,456,789
or across all schemas
/api/contents/my-app/?ids=123,456,789
Thanks Sebastian,
We just tried this:
$filter=id eq '43b3f6f2-0866-499e-bbfb-6d2a8304c3d4'
But it is returning back all records
Here’s how the link looks like:
https://cloud.squidex.io/app/zubale-jobs/content/jobs?pageSize=50&query=%7B%22fullText%22:%22$filter%3Did%20eq%20%2743b3f6f2-0866-499e-bbfb-6d2a8304c3d4%27%22,%22sort%22:%5B%5D,%22filter%22:%7B%22and%22:%5B%5D%7D%7D
In the API you do not need a filter for that:
You can just use
/app/zubale-jobs/content/jobs/43b3f6f2-0866-499e-bbfb-6d2a8304c3d4
If you use a query you have to decide if you want to use OpenAPI OR JSON queries. Right now you combine these things a little bnit:
e.g.
/app/zubale-jobs/content/jobs/?$filter=id eq '43b3f6f2-0866-499e-bbfb-6d2a8304c3d4'
or
/app/zubale-jobs/content/jobs/?query={ filter: { field: id, op: eq, value: '43b3f6f2-0866-499e-bbfb-6d2a8304c3d4' } }
I have simplified the last exampel a little bit to make it more readable.