Links: Add bulk creation of links#344
Merged
Merged
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.
Comment on lines
+303
to
+306
| response = self.post( | ||
| f"projects/{project_name}/links/bulk", | ||
| links=links | ||
| ) |
BigRoy
reviewed
Jul 6, 2026
BigRoy
approved these changes
Jul 6, 2026
BigRoy
left a comment
Member
There was a problem hiding this comment.
Didn't test, but LGTM.
Do you need me to do a test run @iLLiCiTiT ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: