Is there an "in" operator in the Aras REST API?
Hi community,
Is there a way to optimize the following REST request that gets a number of specific items?
https: // arasmagiccastle.com/test/server/odata/MagicItemType ?$ filter=serial_number eq '9879' or serial_number eq '678' or serial_number eq '643' or serial_number eq '123' or serial_number eq '234'........
Problems:
1. The number of requested items isn´t fixed, so the query can get super long
2. I don´t like it (solid argument, don´t question it! [emoticon:33306c418930400bac28808410f8ac8b])
What I would love to have:
https://beautifulplm.com/test/server/odata/MagicItemType?$filter=serial_number in ('9879','678','643','123','234').
Good alternative:
Another option would be to use a POST operation with @aras.action=get. This would allow us to use the filter condition inside the body. But Innovator doesn´t seem to support this variant yet.
Browsers support URLs with a few thousand characters. The long query isn´t a problem right now. But I wonder if there is a more elegant solution to write requests like this? Thanks for any hint!
@Aras: If you need more ideas for REST...Here you go! :)