Skip to content

Commit 49d39ee

Browse files
committed
refactor: clean up
1 parent af5d0ff commit 49d39ee

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

sources/platform/collaboration/general-resource-access.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ await datasetClient.update({
125125

126126
### Sharing restricted resources with pre-signed URLs {#pre-signed-urls}
127127

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.
129129

130130
#### How pre-signed URLs work
131131

@@ -136,14 +136,14 @@ The signature can be temporary (set to expire after a specified duration) or per
136136

137137
#### What links can be pre-signed
138138

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.
140140
This allows fine-grained control over what data can be shared without authentication.
141141

142142
| Resource | Link | Validity | Notes |
143143
|-----------|-----------------------|------|-------|
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. |
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. |
147147

148148
:::info Automatically generated signed URLs
149149

@@ -157,7 +157,7 @@ the API response includes automatically generated fields:
157157
- `itemsPublicUrl` – a pre-signed URL providing access to dataset items
158158
- `keysPublicUrl` – a pre-signed URL providing access to key-value store keys
159159

160-
These automatically generated URLs are **valid for 14 days**.
160+
These automatically generated URLs are _valid for 14 days_.
161161

162162
The response also contains:
163163

@@ -173,30 +173,30 @@ To generate a pre-signed link, you can use the **Export** button in Console.
173173

174174
:::note
175175

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.
177177

178178
:::
179179

180-
**Dataset items:**
180+
##### Dataset items:
181181

182182
1. Click the **Export** button.
183183
2. In the modal that appears, click **Copy shareable link**.
184184

185185
![Generating shareable link for a restricted storage resource](./images/general-resouce-access/copy-shareable-link.png)
186186

187-
**Key-value store records:**
187+
##### Key-value store records:
188188

189189
1. Open a key-value store.
190190
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.
192192

193193
![Copy pre-signed URL for KV store record](./images/general-resouce-access/copy-record-url-kv-store.png)
194194

195195
#### How to generate pre-signed URLs using Apify Client
196196

197197
You can generate pre-signed URLs programmatically for datasets and key-value stores:
198198

199-
**Dataset items**
199+
##### Dataset items:
200200

201201
```js
202202
import { ApifyClient } from "apify-client";
@@ -210,7 +210,7 @@ const itemsUrl = await datasetClient.createItemsPublicUrl({ expiresInSecs: 7 * 2
210210
const permanentItemsUrl = await datasetClient.createItemsPublicUrl();
211211
```
212212

213-
**Key-value store list of keys**
213+
##### Key-value store list of keys:
214214

215215
```js
216216
const storeClient = client.keyValueStore('my-store-id');
@@ -222,7 +222,7 @@ const keysPublicUrl = await storeClient.createKeysPublicUrl({ expiresInSecs: 24
222222
const permanentKeysPublicUrl = await storeClient.createKeysPublicUrl();
223223
```
224224

225-
**Key-value store record**
225+
##### Key-value store record:
226226

227227
```js
228228
// Get permanent URL for a single record
@@ -231,17 +231,17 @@ const recordUrl = await storeClient.getRecordPublicUrl('report.pdf');
231231

232232
:::tip Permanent signed URL
233233

234-
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_.
235235

236236
:::
237237

238238
#### Signing URLs manually
239239

240240
If you need finer control — for example, generating links without using Apify client — you can sign URLs manually using our reference implementation.
241241

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)
243243

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.
245245

246246
### Sharing storages by name
247247

@@ -255,20 +255,20 @@ This is very useful if you wish to expose a storage publicly with an easy to rem
255255

256256
## Implications for public Actor developers
257257

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_.
259259

260260
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.
261261

262262

263263
:::caution Actor runs inherit user permissions
264264

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.
266266

267267
:::
268268

269269
### Migration guide to support restricted general resource access
270270

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_.
272272

273273
---
274274

@@ -318,9 +318,9 @@ Unauthenticated users will be prompted to sign in, ensuring they have required p
318318

319319
#### Test your Actor under restricted access
320320

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_.
322322

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.
324324

325325
:::tip Make sure links work as expected
326326

0 commit comments

Comments
 (0)