senaite / senaite.jsonapi

RESTful JSON API for SENAITE
https://www.senaite.com
GNU General Public License v2.0
11 stars 19 forks source link

can't search by parent_id #33

Open MohamadHussein opened 4 years ago

MohamadHussein commented 4 years ago

Steps to reproduce

using the api to get the arreport of a certain parent_id doesn't work /senaite/@@API/senaite/v1/search?portal_type=ARReport&parent_id=PL-0001&complete=1

Current behavior

returns all the Analysis Report objects

Expected behavior

it should return only the Analysis Report with the specified parent_id

valeriozhang commented 3 years ago

bump

DanKaranja commented 3 years ago

bump

rossrossp commented 1 month ago

Can somebody confirm if this is a bug or intended behaviour? In general, is there filtering available on the API? For instance, how can I get all samples in a batch, or all analyses for a sample?

ramonski commented 1 month ago

Currently you can filter by parent_path with the physical path to the parent object, or the parent_uid, also see https://senaitejsonapi.readthedocs.io/ for examples.

If you want to filter by parent_id or any other criteria, you must add an index to the respective catalog.