Rest api, update with where clause instead of entityid

using the actual jmix version:

is there a way to do update/delete via Rest API,
even when I do not know the entityid?
That entityid is not known outside the app, only combined PKs could be used like:
update table set column = 1 where col1 = ‘x’ and col2 = 122

just asking before I start to implement a workaround using temp tables and then starting the
logic in the app itself using SQLs

KR
Roland

No you cannot update/delete entities via generic REST API without knowing their IDs.

Either load entities by your conditions (col1 = ‘x’ and col2 = 122) first and then update/delete by IDs, or write a custom controller which accepts your parameters and does the job on the backend.

Regards,
Konstantin

1 Like

thx, Konstanting…
meanwhile I already created my own process/controller…
btw: I am using Mage AI for all data transport jobs…
works great

BR
Roland

1 Like