Skip to content

feat: Add API methods for uncovered DM and AS endpoints#8

Merged
achristie-im merged 1 commit into
7.0from
feat/cover-api-endpoint-gaps
Jul 6, 2026
Merged

feat: Add API methods for uncovered DM and AS endpoints#8
achristie-im merged 1 commit into
7.0from
feat/cover-api-endpoint-gaps

Conversation

@claude-im

Copy link
Copy Markdown
Contributor

Summary

Audited every endpoint path in DmApi (dm_api.py) and AsApi (as_api.py) against the live OpenAPI specs (squonk.it/data-manager-api and squonk.it/account-server-api), then wrapped the endpoints that had no client method.

Bug fix

  • DmApi.get_dataset_for_digest() was calling GET /type (which in DM 5.x is "Get the supported File Types" and ignores the digest). Repointed at the dedicated GET /digest/dataset/{digest}.

New DmApi methods (31)

  • Datasetscreate_dataset_from_project_file, upload_dataset, get_dataset, delete_dataset, get_dataset_versions, get_dataset_metadata, update_dataset_metadata, get_dataset_version_metadata, update_dataset_version_metadata, get_dataset_schema, add_dataset_editor, remove_dataset_editor
  • Filesattach_dataset_to_project, move_project_file, get_project_file, delete_project_file
  • Users/accountget_users, get_admin_users, get_account, get_api_log, get_api_token, create_user_account, delete_user_account, update_user_account
  • Project adminsadd_project_administrator, remove_project_administrator
  • Instances/tasksupdate_instance, delete_task
  • Job manifestsget_job_manifests, load_job_manifests, delete_job_manifest

New AsApi method (1)

  • get_charges() (GET /charges, all organisations), mirroring get_organisation_charges().

Docs / tests

  • README.rst method lists updated (alphabetical, per convention).
  • docs/ needs no change — automodule … :members: picks up the new methods.
  • test.py exercises the read-only get_account() / get_api_token().

Not included

  • AS PUT /unit / DELETE /unit — spec labels them "Create/Deletes a new Personal Unit", duplicating the existing create_personal_unit() / delete_personal_unit().

Verification

  • uv run pre-commit run --all-files — ruff, ruff-format, ty, pyroma, commitizen all pass.
  • Re-ran the endpoint audit: 99 DmApi + 53 AsApi call sites, every method+path validated against the live specs, 0 problems.

🤖 Generated with Claude Code

Wrap the DM and AS REST endpoints that had no client method, after
comparing dm_api.py and as_api.py against the live OpenAPI specs.

Adds 31 DmApi methods (datasets, files, users/account, project
administrators, instance/task updates, job manifests) and AsApi.get_charges
(GET /charges). Also fixes DmApi.get_dataset_for_digest(), which called
GET /type instead of the dedicated GET /digest/dataset/{digest} endpoint.

Updates the method lists in README.rst and exercises the read-only
get_account()/get_api_token() methods in test.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@achristie-im achristie-im merged commit 49399f3 into 7.0 Jul 6, 2026
4 checks passed
@achristie-im achristie-im deleted the feat/cover-api-endpoint-gaps branch July 6, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants