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..abd2d6f9 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. @@ -469,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 \ @@ -478,6 +503,8 @@ planet subscriptions request \ --source request-catalog.json \ --tools tools.json \ --delivery cloud-delivery.json \ + --hosting sentinel_hub \ + -- collection_id 4bdef85c-3f50-4006-a713-2350da665f80 \ --pretty ```