Uh oh!
There was an error while loading. Please reload this page.
Links: Add bulk creation of links - #344
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a public API for bulk link creation in ayon_api, using the server’s /links/bulk endpoint when available (>= 1.15.8) and falling back to per-link creation on older servers.
Changes:
- Introduces
create_links()in the public API andLinksAPIhelper, with server-version fallback logic. - Updates typing to distinguish link creation request payload (
CreateLinkData) from response payload (CreateLinkResponseData). - Exposes the new
create_linkshelper from the package__init__.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
ayon_api/typing.py | Adds new link create request/response TypedDicts used by the new bulk API. |
ayon_api/_api.py | Exposes a new top-level create_links() wrapper and updates create_link() return typing. |
ayon_api/_api_helpers/links.py | Implements server-side bulk creation with fallback and introduces link payload validation. |
ayon_api/__init__.py | Exports create_links as part of the public package API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| response = self.post( | ||
| f"projects/{project_name}/links/bulk", | ||
| links=links | ||
| ) |
Uh oh!
There was an error while loading. Please reload this page.
BigRoy
left a comment
There was a problem hiding this comment.
Didn't test, but LGTM.
Do you need me to do a test run @iLLiCiTiT ?
Uh oh!
There was an error while loading. Please reload this page.
Changelog Description
Implemented bulk creation of links to ayon api.
Additional review information
Since AYON server 1.15.8 there is an endpoint to bulk create links on server. Implemented the method using the endpoint. In case older server is available then it does create them one by one. It does validate the data of links.
Testing notes: