Skip to content

Implemented new endpoints for multiple items in Query#994

Open
kalisp wants to merge 5 commits into
developfrom
enhancement/get_reviewables_for_multiple
Open

Implemented new endpoints for multiple items in Query#994
kalisp wants to merge 5 commits into
developfrom
enhancement/get_reviewables_for_multiple

Conversation

@kalisp

@kalisp kalisp commented Jun 23, 2026

Copy link
Copy Markdown
Member

Description of changes

Adds options to query for multiple folders|products|tasks|versions at same time.

Adds also new lastest_done argument to use only approved versions.

Technical details

Additional context

@kalisp kalisp requested a review from martastain June 23, 2026 15:36
@kalisp kalisp self-assigned this Jun 23, 2026
@kalisp kalisp added the type: enhancement Improvement of existing functionality or minor addition label Jun 23, 2026
@kalisp kalisp linked an issue Jun 23, 2026 that may be closed by this pull request
@martastain

Copy link
Copy Markdown
Member

how many entities this is supposed to query at the same time?

@kalisp

kalisp commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

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?)

@martastain

Copy link
Copy Markdown
Member

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.

@kalisp

kalisp commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

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 *_id.)

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.)

kalisp added 3 commits June 24, 2026 13:24
Comment thread ayon_server/access/utils.py Fixed
Comment thread ayon_server/access/utils.py Fixed
@martastain

Copy link
Copy Markdown
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get latest version with reviewable for entities

2 participants