Implemented new endpoints for multiple items in Query#994
Conversation
|
how many entities this is supposed to query at the same time? |
Thats probably question for @Innders. Is the concern size of returned data (so there should be some pagination introduced) (or performance of searching for list of ids?) |
|
Not really. Result is okay, but i can omagine situations where list of IDs won't fit to a query string. Also it loads every entity individually to ensure ACL, which will be very slow in the case of larger lists. |
|
I could change GET to POSTs and put ids to Body. (Or pass some delimiter connected list and parse it out myself, to skip repeating of I tried to use asyncio gather to make ACL checks more palatable, not sure if there would be any faster approach. (But I assume tens or higher tens of ids from where the request came from.) |
The worry is that entity_ids won't fit into Query, so POST replacement was decided.
|
This way, if you don't have access to any of the entities, you get 403. This might be correct (as long you can figure out which entity caused the issue), but if you added a join to hierarchy in the master query and use the folder_access_list there, you could get reviewables for all entities from the list you have access to, without calling ensure_enitity_access first. you'd be down one query and can return a partial response. if the intention for this is to be used in review addon, it is possible that a user does not have access to the entire session. in that case, it should probably resolve everything they have access to instead of failing. but i like the expansion of ensure_entity_access - if that does not break anything, we should totally keep it |
Description of changes
Adds options to query for multiple
folders|products|tasks|versionsat same time.Adds also new
lastest_doneargument to use only approved versions.Technical details
Additional context