From 5f18d5943a1a5daa17fc18eecd5c0ea3f89d56fb Mon Sep 17 00:00:00 2001 From: Emma Steuer Date: Wed, 27 Mar 2024 11:12:47 -0400 Subject: [PATCH 1/3] docs --- docs/cli/cli-guide.md | 2 +- docs/cli/cli-subscriptions.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/cli/cli-guide.md b/docs/cli/cli-guide.md index 01c2d397..68cfa972 100644 --- a/docs/cli/cli-guide.md +++ b/docs/cli/cli-guide.md @@ -18,7 +18,7 @@ If you’re already comfortable with CLI tools you can safely skip this section. extensive examples. * **[CLI for Orders API](cli-orders.md)** dives into the `planet orders` commands with numerous samples to get you started. -* **[CLI for Subscriptions API](cli-subscriptions.md)** - coming soon! +* **[CLI for Subscriptions API](cli-subscriptions.md)** - explains the `planet subscriptions` commands * **[CLI Tips & Tricks](cli-tips-tricks.md)** highlights a number of interesting geospatial CLI command-line tools and shows you how to use them in conjunction with Planet’s tools. diff --git a/docs/cli/cli-subscriptions.md b/docs/cli/cli-subscriptions.md index ac73b20a..88198419 100644 --- a/docs/cli/cli-subscriptions.md +++ b/docs/cli/cli-subscriptions.md @@ -120,6 +120,17 @@ planet subscriptions create my-subscription.json !!!note "Note" The above command assumes that you’ve saved the subscriptions JSON as `my-subscription.json` and that you’ve replaced the delivery information with your own bucket and credentials. +#### Create a Subscription with Hosting and Collection ID + +In addition to the basic subscription creation process, you can now specify hosting options and a collection ID directly in the create command. + +```sh +planet subscriptions create my-subscription.json --hosting sentinel_hub --collection_id ba8f7274-aacc-425e-8a38-e21517bfbeff +``` + +- The --hosting option is optional and currently supports sentinel_hub as its only value. +- The --collection_id is also optional. If you decide to use this, ensure that the subscription request and the collection have matching bands. If you're unsure, allow the system to create a new collection for you by omitting the --collection_id option. This will ensure the newly set-up collection is configured correctly, and you can subsequently add items to this collection as needed. + ### List Subscriptions Now that you’ve got a subscription working you can make use of the other commands. From 8baa12a0a4bf2169a352d89fa952ff3279556df0 Mon Sep 17 00:00:00 2001 From: Emma Steuer Date: Tue, 2 Apr 2024 14:24:45 -0700 Subject: [PATCH 2/3] docs --- docs/cli/cli-subscriptions.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/cli/cli-subscriptions.md b/docs/cli/cli-subscriptions.md index 88198419..f08c7619 100644 --- a/docs/cli/cli-subscriptions.md +++ b/docs/cli/cli-subscriptions.md @@ -480,8 +480,22 @@ The main documentation page also has the parameters for Google Cloud, AWS and Or ### Subscriptions Request -Once you’ve got all your sub-blocks of JSON saved you’re ready to make a complete -subscriptions request with the `subscriptions request` command: +When creating a new subscription, you can include hosting options directly using the --hosting and --collection-id flags. + +- The --hosting option is optional and currently supports sentinel_hub as its only value. +- The --collection_id is also optional. If you decide to use this, ensure that the subscription request and the collection have matching bands. If you're unsure, allow the system to create a new collection for you by omitting the --collection_id option. This will ensure the newly set-up collection is configured correctly, and you can subsequently add items to this collection as needed. +- You may also input --hosting as a JSON file. The file should be formatted: + +```json +"hosting": { + "parameters": { + "collection_id": "4bdef85c-3f50-4006-a713-2350da665f80" + }, + "type": "sentinel_hub" +}, +``` + +Once you’ve got all your sub-blocks of JSON saved you’re ready to make a complete subscriptions request with the `subscriptions request` command: ```sh planet subscriptions request \ @@ -489,6 +503,7 @@ planet subscriptions request \ --source request-catalog.json \ --tools tools.json \ --delivery cloud-delivery.json \ + --hosting sentinel_hub \ --pretty ``` From cdc92ec227c8ec12a39185521c1c36c6963e043d Mon Sep 17 00:00:00 2001 From: Emma Steuer Date: Thu, 4 Apr 2024 13:09:37 -0700 Subject: [PATCH 3/3] collection id --- docs/cli/cli-subscriptions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/cli/cli-subscriptions.md b/docs/cli/cli-subscriptions.md index f08c7619..abd2d6f9 100644 --- a/docs/cli/cli-subscriptions.md +++ b/docs/cli/cli-subscriptions.md @@ -504,6 +504,7 @@ planet subscriptions request \ --tools tools.json \ --delivery cloud-delivery.json \ --hosting sentinel_hub \ + -- collection_id 4bdef85c-3f50-4006-a713-2350da665f80 \ --pretty ```