Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for organization-wide default destinations in the Planet SDK, enabling organizations to designate a single destination that's automatically available to all members for orders and subscriptions.
- Added new API methods for setting, getting, and unsetting default destinations
- Extended CLI with
planet destinations defaultsubcommands for default destination management - Added request builder functions for using default destinations in orders and subscriptions
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| planet/clients/destinations.py | Added async client methods for managing default destinations and is_default filter parameter |
| planet/sync/destinations.py | Added synchronous wrapper methods for default destination management |
| planet/cli/destinations.py | Added CLI commands for default destination operations (set, get, unset) and --is-default filter |
| planet/order_request.py | Added destination() and default_destination() helper functions for orders |
| planet/subscription_request.py | Added destination() and default_destination() helper functions for subscriptions |
| tests/unit/test_order_request.py | Added unit tests for new order request destination functions |
| tests/unit/test_subscription_request.py | Added unit tests for new subscription request destination functions |
| tests/integration/test_destinations_api.py | Added integration tests for default destination API methods |
| tests/integration/test_destinations_cli.py | Added integration tests for default destination CLI commands |
| docs/cli/cli-destinations.md | Added documentation for managing default destinations via CLI |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
4 tasks
Contributor
|
@asonnenschein I've opened a new pull request, #1202, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Use DEFAULT_DESTINATION_REF constant in order_request.py Co-authored-by: asonnenschein <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: asonnenschein <[email protected]>
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.
Add Default Destinations Support
Summary
Adds support for organization-wide default destinations in the Planet SDK. Organizations can now designate a single destination that's automatically available to
all members, simplifying delivery configuration for orders and subscriptions.
Permissions: Setting/unsetting default destinations requires organization admin or destination owner privileges.
Changes
API Client (
planet/clients/destinations.py)set_default_destination(destination_id)- Set a destination as defaultget_default_destination()- Get the current default destinationunset_default_destination()- Remove the default destinationlist_destinations(..., is_default)- Addedis_defaultfilter parameterCLI (
planet/cli/destinations.py)Request Builders
Orders (planet/order_request.py):
destination(destination_ref, path_prefix=None)default_destination(path_prefix=None)Subscriptions (planet/subscription_request.py):
destination(destination_ref, path_prefix=None)default_destination(path_prefix=None)To do