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: sources/platform/collaboration/general-resource-access.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ await datasetClient.update({
125
125
126
126
### Sharing restricted resources with pre-signed URLs {#pre-signed-urls}
127
127
128
-
Even when a resource is restricted, you might still want to share it with someone outside your team — for example, to send a PDF report to a client, or include a screenshot in an automated email or Slack message. In these cases, **storage resources** (like key-value stores, datasets, and request queues) support generating **pre-signed URLs**. These are secure, time-limited links that let others access individual files without needing an Apify account or authentication.
128
+
Even when a resource is restricted, you might still want to share it with someone outside your team — for example, to send a PDF report to a client, or include a screenshot in an automated email or Slack message. In these cases, _storage resources_ (like key-value stores, datasets, and request queues) support generating _pre-signed URLs_. These are secure, time-limited links that let others access individual files without needing an Apify account or authentication.
129
129
130
130
#### How pre-signed URLs work
131
131
@@ -136,14 +136,14 @@ The signature can be temporary (set to expire after a specified duration) or per
136
136
137
137
#### What links can be pre-signed
138
138
139
-
Only selected **dataset** and **key-value store** endpoints support pre-signed URLs.
139
+
Only selected _dataset_ and _key-value store_ endpoints support pre-signed URLs.
140
140
This allows fine-grained control over what data can be shared without authentication.
|**Datasets**|[Dataset items](/api/v2/dataset-items-get) (`/v2/datasets/:datasetId/items`) | Temporary or Permanent | The link provides access to all dataset items. |
145
-
|**Key-value stores**|[List of keys](/api/v2/key-value-store-keys-get) (`/v2/key-value-stores/:storeId/keys`) | Temporary or Permanent | Returns the list of keys in a store. |
146
-
|**Key-value stores**|[Single record](/api/v2/key-value-store-record-get) (`/v2/key-value-stores/:storeId/records/:recordKey`) |**Permanent only**| The public URL for a specific record is always permanent - it stays valid as long as the record exists. |
144
+
|_Datasets_|[Dataset items](/api/v2/dataset-items-get) (`/v2/datasets/:datasetId/items`) | Temporary or Permanent | The link provides access to all dataset items. |
145
+
|_Key-value stores_|[List of keys](/api/v2/key-value-store-keys-get) (`/v2/key-value-stores/:storeId/keys`) | Temporary or Permanent | Returns the list of keys in a store. |
146
+
|_Key-value stores_|[Single record](/api/v2/key-value-store-record-get) (`/v2/key-value-stores/:storeId/records/:recordKey`) |_Permanent only_| The public URL for a specific record is always permanent - it stays valid as long as the record exists. |
147
147
148
148
:::info Automatically generated signed URLs
149
149
@@ -157,7 +157,7 @@ the API response includes automatically generated fields:
157
157
-`itemsPublicUrl` – a pre-signed URL providing access to dataset items
158
158
-`keysPublicUrl` – a pre-signed URL providing access to key-value store keys
159
159
160
-
These automatically generated URLs are **valid for 14 days**.
160
+
These automatically generated URLs are _valid for 14 days_.
161
161
162
162
The response also contains:
163
163
@@ -173,30 +173,30 @@ To generate a pre-signed link, you can use the **Export** button in Console.
173
173
174
174
:::note
175
175
176
-
The link will include a signature **only if the general resource access is set to Restricted**. For unrestricted datasets, the link will work without a signature.
176
+
The link will include a signature _only if the general resource access is set to Restricted_. For unrestricted datasets, the link will work without a signature.
177
177
178
178
:::
179
179
180
-
**Dataset items:**
180
+
##### Dataset items:
181
181
182
182
1. Click the **Export** button.
183
183
2. In the modal that appears, click **Copy shareable link**.
184
184
185
185

186
186
187
-
**Key-value store records:**
187
+
##### Key-value store records:
188
188
189
189
1. Open a key-value store.
190
190
2. Navigate to the record you want to share.
191
-
3. In the **Actions** column, click the link icon to **copy signed link**.
191
+
3. In the **Actions** column, click the link icon to copy signed link.
192
192
193
193

194
194
195
195
#### How to generate pre-signed URLs using Apify Client
196
196
197
197
You can generate pre-signed URLs programmatically for datasets and key-value stores:
If the `expiresInSecs` option is not specified, the generated link will be **permanent**.
234
+
If the `expiresInSecs` option is not specified, the generated link will be _permanent_.
235
235
236
236
:::
237
237
238
238
#### Signing URLs manually
239
239
240
240
If you need finer control — for example, generating links without using Apify client — you can sign URLs manually using our reference implementation.
241
241
242
-
👉 [See reference implementation in Apify clients](https://github.com/apify/apify-client-js/blob/5efd68a3bc78c0173a62775f79425fad78f0e6d1/src/resource_clients/dataset.ts#L179)
242
+
[Check the reference implementation in Apify clients](https://github.com/apify/apify-client-js/blob/5efd68a3bc78c0173a62775f79425fad78f0e6d1/src/resource_clients/dataset.ts#L179)
243
243
244
-
Manual signing uses standard **HMAC (SHA-256)** with `urlSigningSecretKey` of the resource and can be easily integrated.
244
+
Manual signing uses standard _HMAC (SHA-256)_ with `urlSigningSecretKey` of the resource and can be easily integrated.
245
245
246
246
### Sharing storages by name
247
247
@@ -255,20 +255,20 @@ This is very useful if you wish to expose a storage publicly with an easy to rem
255
255
256
256
## Implications for public Actor developers
257
257
258
-
If you own a public Actor in the Apify Store, you need to make sure that your Actor will work even for users who have restricted access to their resources. Over time, you might see a growing number of users with **General resource access** set to **Restricted**.
258
+
If you own a public Actor in the Apify Store, you need to make sure that your Actor will work even for users who have restricted access to their resources. Over time, you might see a growing number of users with _General resource access_ set to _Restricted_.
259
259
260
260
In practice, this means that all API calls originating from the Actor need to have a valid API token. If you are using Apify SDK, this should be the default behavior. See the detailed guide below for more information.
261
261
262
262
263
263
:::caution Actor runs inherit user permissions
264
264
265
-
Keep in mind that when users run your public Actor, the Actor makes API calls under the user account, not your developer account. This means that it follows the **General resource access** configuration of the user account. The configuration of your developer account has no effect on the Actor users.
265
+
Keep in mind that when users run your public Actor, the Actor makes API calls under the user account, not your developer account. This means that it follows the _General resource access_ configuration of the user account. The configuration of your developer account has no effect on the Actor users.
266
266
267
267
:::
268
268
269
269
### Migration guide to support restricted general resource access
270
270
271
-
This section provides a practical guide and best practices to help you update your public Actors so they fully support **Restricted general resource access**.
271
+
This section provides a practical guide and best practices to help you update your public Actors so they fully support _Restricted general resource access_.
272
272
273
273
---
274
274
@@ -318,9 +318,9 @@ Unauthenticated users will be prompted to sign in, ensuring they have required p
318
318
319
319
#### Test your Actor under restricted access
320
320
321
-
Before publishing or updating your Actor, it’s important to verify that it works correctly for users with **restricted general resource access**.
321
+
Before publishing or updating your Actor, it’s important to verify that it works correctly for users with _restricted general resource access_.
322
322
323
-
You can easily test this by switching your own account’s setting to **Restricted**, or by creating an organization under your account and enabling restricted access there. This approach ensures your tests accurately reflect how your public Actor will behave for end users.
323
+
You can easily test this by switching your own account’s setting to _Restricted_, or by creating an organization under your account and enabling restricted access there. This approach ensures your tests accurately reflect how your public Actor will behave for end users.
0 commit comments