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
feat: add new methods Dataset.createItemsPublicUrl & KeyValueStore.createKeysPublicUrl (#720)
When storage resources (Datasets or Key-Value Stores) are set to
Restricted, accessing or sharing their data externally becomes difficult
due to limited permissions. This PR introduces functionality to generate
signed URLs that allow controlled external access to these resources
without adding token to the request.
This PR introduces methods to generate signed URLs for Dataset items and
Key-Value Store records:
1. **Datasets**
`dataset(:datasetId).createItemsPublicUrl(options, expiresInMillis)`
→ Returns a signed URL like:
`/v2/datasets/:datasetId/items?signature=xxx`
2. Key-Value Stores
`keyValueStore(:storeId).createKeysPublicUrl(options, expiresInMillis)`
→ Returns a signed URL like:
`/v2/key-value-stores/:storeId/keys?signature=xxx`
🕒 Expiration:
The `expiresInMillis` parameter defines how long the signature is valid.
- If provided, the URL will expire after the specified time.
- If omitted, the URL will never expire.
Note: The signature is included only if the token has WRITE access to
the storage. Otherwise, an unsigned URL is returned.
P.S. We're not yet exposing `urlSigningSecretKey` for datasets, it will
be released after [PR](apify/apify-core#22173)
is merged.
[More context
here](https://www.notion.so/apify/Signed-Dataset-Items-KV-store-record-URLs-224f39950a2280158a6bd82bc2e2ebb5?source=copy_link)
0 commit comments