You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/stac-api/asset-upload.md
+44-38Lines changed: 44 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,10 +39,16 @@ Uploading an asset file via the STAC API involves three main steps:
39
39
40
40
2.**Upload file parts:**
41
41
42
-
Use the presigned URLs returned in step 1 to [upload each part](https://data.geo.admin.ch/api/stac/static/spec/v1/apitransactional.html#tag/Asset-Upload-Management/operation/uploadAssetFilePart). You may upload parts in parallel.
42
+
Use the presigned URLs returned in step 1 to [upload each part](https://data.geo.admin.ch/api/stac/static/spec/v1/apitransactional.html#tag/Asset-Upload-Management/operation/uploadAssetFilePart).
You may upload parts in parallel. It is possible to retry a failed upload.
47
+
48
+
:::warning
49
+
Presigned URLs expire within three hours, so the upload must be completed before that.
50
+
:::
51
+
46
52
<br/>
47
53
48
54
3.**Complete the upload:**
@@ -126,7 +132,7 @@ If you have recurrent asset uploads, you need to have proper error handling to p
126
132
The number of retries should be adjusted based on the upload frequency.
127
133
128
134
- For low-frequency uploads (e.g., daily), it is advisable to implement at least 3 retries, using exponential backoff time between retries.
129
-
- For high-frequency uploads, you may choose to skip retries and instead cancel the current upload, relying on the next scheduled upload as a fallback.
135
+
- For high-frequency uploads, you may choose to skip retries and instead abort the current upload, relying on the next scheduled upload as a fallback.
130
136
131
137
:::tip GLOSSARY
132
138
@@ -136,58 +142,58 @@ The number of retries should be adjusted based on the upload frequency.
136
142
137
143
The following example illustrates best practices for handling errors during repeated asset uploads.
|`500 Internal Server Error`| Cancel upload. Report to service administrator (retry usually useless). |
189
-
|`502 Bad Gateway`, `503 Service Unavailable`, `504 Gateway Timeout`| Service is momentarily not available, wait a short moment, then retry the request. |
|`500 Internal Server Error`| Cancel upload. Report to service administrator (retry usually useless). |
195
+
|`502 Bad Gateway`, `503 Service Unavailable`, `504 Gateway Timeout`| Service is momentarily not available, wait a short moment, then retry the request. |
190
196
191
-
The following figure shows the flow of a multipart upload process.
197
+
The following figure shows the flow of a multipart upload process.
Copy file name to clipboardExpand all lines: docs/stac-api/authentication.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Basic authentication and token authentication were removed in STAC API version `
11
11
12
12
## Session Authentication
13
13
14
-
Users can browse geodata in the "admin interface", a web-based UI available to selected user.
14
+
Users can browse geodata in the "admin interface", a web-based UI available to selected users.
15
15
Upon successful login, the service issues a session cookie that authenticates subsequent requests from the browser.
16
16
17
17
Session authentication is designed specifically for browser-based workflows and may not work with non-browser clients or all API endpoints.
@@ -23,7 +23,7 @@ JWT authentication is the recommended approach for API clients performing write
23
23
JWT authentication involves two steps:
24
24
25
25
1. Obtain a JWT token from Amazon Cognito's [InitiateAuth API](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html).
26
-
2. Include the tokes in the HTTP `Authorization` header using the `Bearer` scheme as defined in [RFC 6750](https://datatracker.ietf.org/doc/html/rfc6750#section-2.1).
26
+
2. Include the token in the HTTP `Authorization` header using the `Bearer` scheme as defined in [RFC 6750](https://datatracker.ietf.org/doc/html/rfc6750#section-2.1).
27
27
28
28
To obtain a JWT token, use Amazon Cognito’s InitiateAuth API by sending your username and password, along with your client ID. For example:
To optimize transfer speeds, files between 1 MB and 10 MB are automatically compressed during download.
8
+
To optimize transfer speeds, files between 1 MB and 10 MB are automatically compressed during download if the client supports it.
9
9
The compression format - either GZIP (`gzip`) or Brotli (`br`) - is determined by the `Accept-Encoding` header sent with the request.
10
10
11
+
Files that are already stored in a compressed format are not compressed again during download.
12
+
11
13
Compression is only applied to standard media types supported by Amazon CloudFront.
12
14
For details, refer to the CloudFront documentation on [serving compressed files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types).
13
15
14
16
## Compression Before Upload
15
17
16
-
For files larger than 10 MB, it's recommended to use a [compressed media type](/docs/stac-api/supported-media).
17
-
If that is not an option, you can either split the file into smaller parts or compress it manually.
18
+
For files larger than 10 MB, we recommended to use a [compressed media type](/docs/stac-api/supported-media).
19
+
20
+
If you cannot use a compressed media type, compress the file yourself with `gzip` or `br`.
21
+
To have the file delivered later in its compressed form, set the `content_encoding` parameter in the [multipart upload request](https://data.geo.admin.ch/api/stac/static/spec/v1/apitransactional.html#tag/Asset-Upload-Management/operation/createAssetUpload) accordingly.
22
+
Client applications must support the selected compression format.
18
23
19
-
If you compress the file manually using `gzip` or `br`, you must set the `content_encoding` parameter inf the [multipart upload request](https://data.geo.admin.ch/api/stac/static/spec/v1/apitransactional.html#tag/Asset-Upload-Management/operation/createAssetUpload) accordingly.
20
-
The file will then be delivered in its compressed form, as indicated by the `Content-Encoding` header.
21
-
Client applications must be able to handle this compression format.
24
+
If the file remains too large after compression, split it into smaller parts.
Copy file name to clipboardExpand all lines: docs/stac-api/migrate09-10.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,13 @@
2
2
outline: [2, 3]
3
3
---
4
4
5
-
# Changes and Migration from`v0.9` to `v1`
5
+
# Migrate`v0.9` to `v1`
6
6
7
7
The new major release `v1` of the STAC API brings a number of additional features and fields and a few breaking changes with respect to `v0.9`.
8
-
In order to highlight the changes we'll use the following example `item` and `asset` JSON objects to illustrate the differences.
9
8
10
-
::: details Example `item` JSON
9
+
In order to highlight the changes we'll use the following example `item` and `asset` JSON objects (compliant with `v0.9`) to illustrate the differences.
10
+
11
+
::: details Example `item` JSON (`v0.9`)
11
12
12
13
```json
13
14
{
@@ -44,7 +45,7 @@ In order to highlight the changes we'll use the following example `item` and `as
0 commit comments