Skip to content

Conversation

@asonnenschein
Copy link
Contributor

@asonnenschein asonnenschein commented Nov 11, 2025

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 default
  • get_default_destination() - Get the current default destination
  • unset_default_destination() - Remove the default destination
  • list_destinations(..., is_default) - Added is_default filter parameter

CLI (planet/cli/destinations.py)

planet destinations default set <destination_id>
planet destinations default get
planet destinations default unset
planet destinations list --is-default true/false

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

  • Update documentation

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 default subcommands 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.

Copy link
Contributor

Copilot AI commented Nov 12, 2025

@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]>
Copy link
Contributor

@charcey charcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great Adrian!

@asonnenschein asonnenschein merged commit 193a79a into main Nov 17, 2025
9 checks passed
@asonnenschein asonnenschein deleted the adrian/default-destinations branch November 17, 2025 14:21
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.

3 participants