roop
1
Hi,
I need an example to filter for a custom field.
This works:
/rest/objects/?filter={"type_id": 1}
But I don’t have any idea how to filter my own fields?
I tested the unique field name, but without an result:
/rest/objects/?filter={"type_id": 1, "text-59937": "test"}
Thanks for your help.
Bye Ron
roop
2
Solution
The results section (array) of the API result is like the object in MongoDB.
{
"_id": ObjectId("..."),
"type_id": 1,
"status": true,
"version": "1.0.0",
"creation_time": "ISODate(...)",
"author_id": 1,
"last_edit_time": null,
"editor_id": null,
"active": true,
"fields": [
{
"name": "text-59937",
"value": "test"
}
],
"public_id": 1,
"views": 0
}
MongoDB Documentation
Filter:
{
"type_id": 1,
"fields": {
"name" : "text-59937",
"value" : "test"
}
}
Thanks Ron