DWH: Management API: More destination methods added. - #87
Merged
sm-dmitrijus merged 1 commit intoSep 3, 2026
Merged
Conversation
jari-sinkkonen
approved these changes
Sep 3, 2026
jari-sinkkonen
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the hand-written layer (skipped _generated/). Clean, complete, and consistent with the transfers.batch_create() batch pattern. Approving.
Verified against source:
- Wrapper:
batch_update()on both sync + async,BatchUpdateDestinationsBody(type_=destination_type, updates=...), unwrapsparsed.datatoBatchUpdateDestinationsResponse200Data, routes non-200 through_raise_for_statuswithbad_request_msg. No 404 handling — correct, the batch route has no 404 (same asbatch_create). - Wiring complete:
__init__exportsBatchUpdateDestinationsBodyUpdatesItem,_raw.pymirrors on both raw-response classes, allowlist addsPATCH /teams/{team_id}/destinations/batch. - Docstrings match the generated models exactly —
has_errors: bool,results: list[...]with per-itemdestination_id/status/error_code/message, updates itemdestination_id: int+new_secret: str. The README and api-reference examples use valid attributes and run (checked after the #86 doc drift — no repeat here), and HISTORY is updated in this same PR. - Tests: sync unit covers success, partial failure (asserts per-item
status/error_code), params-on-the-wire (body.type_,updates), and 401/400/500; async unit has full parity including the 500 case; e2e asserts the PATCH method/path/bearer/body and the partial-failure per-item errors over a real loopback server.just qagreen (2112).
Non-blocking nit (optional): the async e2e tests assert a bit less than their sync e2e counterparts — the async success test checks only len(results.results) (not the per-item destination_id/status the sync one checks), and the async e2e lacks the 400 case the sync e2e has. The error taxonomy is fully covered at the unit level for both sync and async, so this is symmetry polish, not a gap. LGTM 🚀
sm-dmitrijus
deleted the
dwh-management-api/item-22a3/add-missing-destinaiton-methods
branch
September 3, 2026 09:37
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.
What
Adds the last missing Destinations endpoint —
batch_update()— completing 8/8 coverage for Item 22a-3.batch_update(team_id, *, destination_type, updates)rotates secrets for up to 100 destinations of the same type in a single PATCH request. Each update is applied independently; partial failures are reported per item viahas_errorsand per-itemstatus/error_code/message.What changed
PATCH /teams/{team_id}/destinations/batchadded tosdk-endpoint-filters.yamlbatch_update()on bothDestinationsResourceandDestinationsAsyncResource, following the same batch pattern astransfers.batch_create()batch_updateon bothwith_raw_responseclassesBatchUpdateDestinationsBodyUpdatesItemexported fromsupermetricsdocs/api-reference.md, andHISTORY.mdupdatedResult
just qagreen (2112 passed, lint clean, typecheck clean, parity 24/24)