Skip to content

Commit dabc5eb

Browse files
authored
Merge pull request #128 from geoadmin/bug-stac-post
Fixed wrong docu about STAC create asset
2 parents a2e7f53 + 068f227 commit dabc5eb

File tree

2 files changed

+311
-171
lines changed

2 files changed

+311
-171
lines changed

download-data/stac-api/authentication.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,14 @@ The access token you receive is valid only for a limited time, as specified by t
5959
Once you have a valid JWT token (for example, `123456`), you can create a new asset by including the token in the Authorization header:
6060

6161
```bash
62-
curl --request POST \
63-
--url https://data.geoadmin.ch/api/stac/v1/collections/ch.swisstopo.swisstlmregio/items/swisstlmregio-2020/assets \
62+
curl --request PUT \
63+
--url https://data.geo.admin.ch/api/stac/v1/collections/ch.swisstopo.swisstlmregio/items/swisstlmregio_2020/assets/swisstlmregio_2020_2056.gdb.zip \
6464
--header 'Authorization: Bearer 123456' \
6565
--header 'Content-Type: application/json' \
6666
--data '{
67-
"id": "fancy_unique_id",
68-
"item": "swisstlmregio-2020",
69-
"title": "My title",
70-
"type": "application/x.filegdb+zip",
71-
"description": "My description",
67+
"id": "swisstlmregio_2020_2056.gdb.zip",
68+
"item": "swisstlmregio_2020",
69+
"type": "application/x.shapefile+zip",
7270
"proj:epsg": 2056,
7371
"file:checksum": "12200ADEC47F803A8CF1055ED36750B3BA573C79A3AF7DA6D6F5A2AED03EA16AF3BC"
7472
}'

0 commit comments

Comments
 (0)