Skip to content

Links: Add bulk creation of links#344

Merged
iLLiCiTiT merged 7 commits into
developfrom
enhancement/links-bulk-creation
Jul 6, 2026
Merged

Links: Add bulk creation of links#344
iLLiCiTiT merged 7 commits into
developfrom
enhancement/links-bulk-creation

Conversation

@iLLiCiTiT

Copy link
Copy Markdown
Member

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:

  1. It is possible to create multiple links at once.

@iLLiCiTiT iLLiCiTiT added the type: enhancement New feature or request label Jul 3, 2026
@iLLiCiTiT iLLiCiTiT self-assigned this Jul 3, 2026
@iLLiCiTiT iLLiCiTiT requested a review from BigRoy July 3, 2026 15:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 and LinksAPI helper, with server-version fallback logic.
  • Updates typing to distinguish link creation request payload (CreateLinkData) from response payload (CreateLinkResponseData).
  • Exposes the new create_links helper 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 thread ayon_api/typing.py Outdated
Comment thread ayon_api/_api_helpers/links.py Outdated
Comment thread ayon_api/_api_helpers/links.py Outdated
Comment on lines +303 to +306
response = self.post(
f"projects/{project_name}/links/bulk",
links=links
)
Comment thread ayon_api/typing.py

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test, but LGTM.

Do you need me to do a test run @iLLiCiTiT ?

@iLLiCiTiT iLLiCiTiT merged commit 6fb70f3 into develop Jul 6, 2026
3 checks passed
@iLLiCiTiT iLLiCiTiT deleted the enhancement/links-bulk-creation branch July 6, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants