feat: metadata imports API (sync spec v0.7.17) - #75
Merged
Merged
Conversation
amyxst
approved these changes
Aug 13, 2026
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
Syncs the SDK to spec v0.7.17 (cloudglue/cloudglue-api-spec#110) and bumps the package to 0.7.22. One feature: bulk metadata imports — saved definitions that list a data connector's source files and import each one's source metadata into a metadata collection (no media download, no credits), with run history, modes, caps, and cancellation.
Generated (cloudglue/sdk)
MetadataImportsApiwith the six operations over/collections/{collection_id}/imports(create/list/get/delete definitions, trigger run, cancel run)MetadataImport,MetadataImportDetail(definition + one page of run history),MetadataImportList,MetadataImportDelete,MetadataImportRun,MetadataImportRunProgress,MetadataImportFilterSet,CreateMetadataImportRequest,CreateMetadataImportRunRequestWrapper (cloudglue/client)
client.metadata_importsresource:create(full definition surface —filters,default_mode,delete_missing,rate_limit,start,max_files,include_thumbnails),list,get(pages run history vialimit/offset),delete,run(per-run overrides, 409 when a run is already active in the collection),cancel_runfrom(aliased tovar_fromon the pydantic model); docstrings carry the spec's semantics: append vs refresh, delete-missing sweep scope, capped runs never sweep, per-connector rate-limit clampingMetadataImport,MetadataImportDetail,MetadataImportList,MetadataImportRun,MetadataImportRunProgress,MetadataImportFilterSetEntirely additive — no existing wrapper methods or models change.
Test plan
CreateMetadataImportRequestround-trips thefromfilter alias; nestedlatest_run.progressparses;client.metadata_importswired~/Downloads/cloudglue-v0.7.17-sdk-test-results.md, matching JS battery 11/11): throwaway metadata collection + google-drive import withmax_files=3; create(start=False) saves definition only; list/get; run trigger; concurrent trigger 409; capped run completes withlisted=3 queued=3 indexed=3 failed=0; append rerun skips all 3;get(limit=1)pages run history; cancel lands ascancelled; delete then get 404; collection deleted at cleanup — account left cleanNote
Medium Risk
Additive client/SDK change with low regression risk, but refresh runs with delete_missing can remove collection files previously brought in by that import—callers should understand that behavior.
Overview
Adds bulk metadata imports for metadata collections: saved jobs that page a data connector and import source metadata into the collection (no media download), with OpenAPI 0.7.17 codegen plus a
client.metadata_importswrapper.The high-level client exposes
create,list,get,delete,run, andcancel_run, including connector filters, append/refresh modes, optionaldelete_missingon refresh, rate limits,max_files, andinclude_thumbnails.runsurfaces 409 when another import run is already active on the same collection. Related types are re-exported from the top-levelcloudgluepackage.Existing APIs and wrapper resources are unchanged; this is additive SDK surface.
Reviewed by Cursor Bugbot for commit 7ff523a. Bugbot is set up for automated code reviews on this repo. Configure here.