Skip to content

Add methods for endpoints missing from AYON server 1.16.8 - #368

Open
iLLiCiTiT wants to merge 5 commits into
developfrom
enhancement/missing-server-endpoints
Open

iLLiCiTiT wants to merge 5 commits into
developfrom
enhancement/missing-server-endpoints

Conversation

@iLLiCiTiT

@iLLiCiTiT iLLiCiTiT commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Changelog Description

Added methods for AYON server 1.16.8 REST endpoints that had no wrapper in the python api.

Additional info

Every route in server 1.16.8 was compared with the endpoints the api calls. Payloads and query params were checked against the server request models.

New helper classes (added to ServerAPI and automated_api.py): UsersAPI, ServicesAPI, SystemAPI, ReviewablesAPI.

  • Users: create, update, delete and rename user, password, user access groups, sessions, api keys, permissions. Access groups CRUD and set_projects_access. Teams and team members. Project users.
  • Addon settings: set studio and project settings, studio and project overrides (get, modify, delete), raw overrides, set site settings, migrate_addon_settings, migrate_settings_by_bundle. get_addon_settings_schema takes optional variant and site_id.
  • Projects: anatomy presets (save, rename, delete, set and unset primary), anatomy schema, get and set project anatomy, rename_project, project stats and tags, project bundle (get, set, unset), set_project_root_overrides, get_project_entity_uris, resolve_uris, get_project_file_info.
  • Folders: search_folders, get_entity_groups.
  • Services and system: services (list, spawn, update, delete), hosts, sites (list, delete), restart required (get, set), server config schema, update_server_config (PATCH), enums.
  • Events: delete_events through eventops. An empty filter deletes all events on the server side.
  • Review and tasks: reviewables for entities (list, sort, update label), assign_users_to_task, entity list materialize and items order, entity and project thumbnail upload, get_project_thumbnail.

_api.py and __init__.py were regenerated with automated_api.py. The _api.py diff only adds lines; plain git diff shows it as moved because of the diff algorithm.

Not added on purpose: endpoints used only by the web UI (onboarding, Ynput Cloud connect, metrics, csv import and export, avatars, password reset, views, frontend preferences, market) and deprecated routes.

Server version requirements

Endpoints and arguments were compared between server 1.14.5 (the last 1.14.x) and 1.16.8. The ones added later raise UnsupportedServerVersion on older servers:

  • 1.15.0: rename_project, get_project_thumbnail, set_project_thumbnail, set_project_thumbnail_from_stream
  • 1.15.4: search argument of search_folders
  • 1.15.9: update_server_config, set_entity_list_items_order
  • 1.16.4: get_enums, get_reviewables, latest and latest_done of the entity reviewables getters
  • 1.16.7: error argument of update_service
  • 1.16.8: migrate_addon_settings

On servers older than 1.15.0, rename_user uses the deprecated PATCH endpoint instead of failing. The registryAuth service config key (1.16.7) is only documented, because older servers ignore unknown config keys.

Testing notes:

New tests run against a real AYON server, like the other server tests (AYON_SERVER_URL and AYON_API_KEY of an admin user). They create only temporary users, access groups, projects, sites and events, and remove them afterwards. Studio-level addon settings are written to a temporary settings variant.

  • tests/test_users_api.py, tests/test_addon_settings_api.py, tests/test_projects_api.py, tests/test_system_api.py, tests/test_review_tasks_lists_api.py
  • tests/test_server_version_validation.py checks the version validation and needs no server.
  1. Set AYON_SERVER_URL and AYON_API_KEY.
  2. Run pytest tests/test_users_api.py tests/test_addon_settings_api.py tests/test_projects_api.py tests/test_system_api.py tests/test_review_tasks_lists_api.py tests/test_server_version_validation.py.

🤖 Generated with Claude Code

Cover REST endpoints of server 1.16.8 that had no wrapper:
- Users: create/update/delete/rename user, password, access groups,
  sessions, api keys, permissions; access groups; teams; project users.
- Addon settings: set studio/project settings, studio/project overrides
  and raw overrides, site settings, settings migration.
- Projects: anatomy presets management, project anatomy, rename, stats,
  tags, project bundle, root overrides, entity URIs, URI resolve,
  project file info; folder search and entity grouping.
- Services, hosts, sites, restart required, server config schema and
  patch, enums, bulk event delete.
- Reviewables listing/sorting/update, task assignment, entity list
  materialize/order, entity and project thumbnails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iLLiCiTiT iLLiCiTiT added the type: enhancement New feature or request label Oct 15, 2026
Raise 'UnsupportedServerVersion' when a method uses an endpoint or
argument that is not available on the connected server:
- 1.15.0: rename_project, get_project_thumbnail,
  set_project_thumbnail, set_project_thumbnail_from_stream
- 1.15.4: 'search' argument of search_folders
- 1.15.9: update_server_config, set_entity_list_items_order
- 1.16.4: get_enums, get_reviewables, 'latest' and 'latest_done'
  arguments of entity reviewables getters
- 1.16.7: 'error' argument of update_service
- 1.16.8: migrate_addon_settings

rename_user uses the deprecated PATCH endpoint on servers older
than 1.15.0 instead of failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iLLiCiTiT iLLiCiTiT self-assigned this Oct 15, 2026
@iLLiCiTiT
iLLiCiTiT requested a review from BigRoy October 15, 2026 09:29
Comment thread ayon_api/_api_helpers/thumbnails.py Outdated
iLLiCiTiT and others added 2 commits October 15, 2026 11:42
Tests for users, access groups, teams, addon settings, projects,
anatomy presets, folders search, thumbnails, services, sites, system,
events deletion, reviewables, task assignment and entity lists run
against a real AYON server, like the other server tests. Server
version validation is tested without a server.

Fixes found while writing the tests:
- 'delete_events' refuses a filter without conditions, which would
  delete all events.
- Settings, overrides, anatomy, roots, access group and server config
  payloads are sent as JSON body instead of keyword arguments, so
  any key name works.
- 'set_project_thumbnail' and 'set_project_thumbnail_from_stream'
  return thumbnail id like entity thumbnail setters.
- Docstrings of 'set_project_root_overrides' and
  'get_version_reviewables'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BigRoy
BigRoy requested a review from tadeas-hejnic October 15, 2026 12:37
@BigRoy

BigRoy commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

@tadeas-hejnic can you test this - and review this if the code and API makes sense to you?

@MustafaJafar any question on some of these from docs standpoint?

@BigRoy
BigRoy requested a review from MustafaJafar October 15, 2026 12:37
Comment thread ayon_api/_api_helpers/thumbnails.py Outdated
In future more entity types might support thumbnails using the same endpoint format. It is also private method there is no reason validate it.
@MustafaJafar

Copy link
Copy Markdown
Member

@MustafaJafar any question on some of these from docs standpoint?

Not at all, thank you for the heads up. fyi, the python api docs are simply generated and deployed on release.

Also, I'm considering visiting the docs generation setup for this repo to make it on par with the other docs (either switch to mk docs, or simply keep the current while updating the theme).

@iLLiCiTiT

Copy link
Copy Markdown
Member Author

Also, I'm considering visiting the docs generation setup for this repo to make it on par with the other docs (either switch to mk docs, or simply keep the current while updating the theme).

I did this #367 because poetry was broken in some of the newer PRs.

@iLLiCiTiT
iLLiCiTiT marked this pull request as ready for review October 15, 2026 13:24

This branch has not been deployed

No deployments
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