Skip to content

Commit 6da207d

Browse files
committed
Added data asset commands to docs.
1 parent c995a8c commit 6da207d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/cli/cli-data.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,25 @@ that are of standard (aka not test) quality. Therefore, these filters can be eas
326326
planet data filter --permission --std-quality --asset ortho_analytic_8b_sr | planet data search PSScene --filter -
327327
```
328328

329+
## `data asset` command basics
330+
331+
To activate an asset for download three commands must be queried, in sequence:
332+
1. `asset-activate` - activate an asset
333+
2. `asset-wait` - wait for an asset to be activated
334+
3. `asset-download` - download an activated asset
335+
336+
For example, if we want to download a `basic_udm2` asset from item ID
337+
`20221003_002705_38_2461`, a `PSScene` item type:
338+
339+
```
340+
planet data asset-activate PSScene 20221003_002705_38_2461 basic_udm2 && \
341+
planet data asset-wait PSScene 20221003_002705_38_2461 basic_udm2 && \
342+
planet data asset-download PSScene 20221003_002705_38_2461 basic_udm2 --directory /path/to/data/
343+
00:00 - order my asset - state: active
344+
{'_links': {'_self': 'https://api.planet.com/data/v1/assets/eyJpIjogIjIwMjIxMDAzXzAwMjcwNV8zOF8yNDYxIiwgImMiOiAiUFNTY2VuZSIsICJ0IjogImJhc2ljX3VkbTIiLCAiY3QiOiAiaXRlbS10eXBlIn0', 'activate': 'https://api.planet.com/data/v1/assets/eyJpIjogIjIwMjIxMDAzXzAwMjcwNV8zOF8yNDYxIiwgImMiOiAiUFNTY2VuZSIsICJ0IjogImJhc2ljX3VkbTIiLCAiY3QiOiAiaXRlbS10eXBlIn0/activate', 'type': 'https://api.planet.com/data/v1/asset-types/basic_udm2'}, '_permissions': ['download'], 'expires_at': '2023-03-02T19:30:48.942718', 'location': 'https://api.planet.com/data/v1/download?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJQYWtGNHZuUEs3WXRmSFNGUklHY2I3YTNXT3piaTlaam4zWUpZMmxnd0x5cVlFMVBRSHU5QXNCcjR5Q3FxSjBNbl9yN3VwVEFQYUI1ZzhYNUJmcDhmUT09IiwiZXhwIjoxNjc3Nzg1NDQ4LCJ0b2tlbl90eXBlIjoidHlwZWQtaXRlbSIsIml0ZW1fdHlwZV9pZCI6IlBTU2NlbmUiLCJpdGVtX2lkIjoiMjAyMjEwMDNfMDAyNzA1XzM4XzI0NjEiLCJhc3NldF90eXBlIjoiYmFzaWNfdWRtMiJ9.Dd0opDjW3bBS6qLLZoNiJkfBsO2n5Xz9pM5apEUz_K6viDPFexhJiy6bMbaySbby8W0YvuATdb1uYXS2FkweDg', 'md5_digest': '3a9f7dd1ce500f699d0a96afdd0e3aa2', 'status': 'active', 'type': 'basic_udm2'}
345+
/path/to/data/20221003_002705_38_2461_1A_udm2.tif: 100%|██████████████████████████████████| 3.16k/3.16k [00:00<00:00, 32.0MB/s]
346+
```
347+
329348
## Stats
330349

331350
TODO

0 commit comments

Comments
 (0)