Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosting and collection id documentation #1030

Merged
merged 3 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cli/cli-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
30 changes: 28 additions & 2 deletions docs/cli/cli-subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -469,15 +480,30 @@ 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 \
--name 'First Subscription' \
--source request-catalog.json \
--tools tools.json \
--delivery cloud-delivery.json \
--hosting sentinel_hub \
--pretty
```

Expand Down
Loading