feat: Add API methods for uncovered DM and AS endpoints#8
Merged
Conversation
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>
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.
Summary
Audited every endpoint path in
DmApi(dm_api.py) andAsApi(as_api.py) against the live OpenAPI specs (squonk.it/data-manager-apiandsquonk.it/account-server-api), then wrapped the endpoints that had no client method.Bug fix
DmApi.get_dataset_for_digest()was callingGET /type(which in DM 5.x is "Get the supported File Types" and ignores the digest). Repointed at the dedicatedGET /digest/dataset/{digest}.New
DmApimethods (31)create_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_editorattach_dataset_to_project,move_project_file,get_project_file,delete_project_fileget_users,get_admin_users,get_account,get_api_log,get_api_token,create_user_account,delete_user_account,update_user_accountadd_project_administrator,remove_project_administratorupdate_instance,delete_taskget_job_manifests,load_job_manifests,delete_job_manifestNew
AsApimethod (1)get_charges()(GET /charges, all organisations), mirroringget_organisation_charges().Docs / tests
README.rstmethod lists updated (alphabetical, per convention).docs/needs no change —automodule … :members:picks up the new methods.test.pyexercises the read-onlyget_account()/get_api_token().Not included
PUT /unit/DELETE /unit— spec labels them "Create/Deletes a new Personal Unit", duplicating the existingcreate_personal_unit()/delete_personal_unit().Verification
uv run pre-commit run --all-files— ruff, ruff-format, ty, pyroma, commitizen all pass.🤖 Generated with Claude Code