Skip to content

Commit a1d2847

Browse files
committed
docs: add resourceType property to support storage picker
1 parent 90cd642 commit a1d2847

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
40.2 KB
Loading
76.5 KB
Loading

sources/platform/actors/development/actor_definition/input_schema/specification.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,3 +409,41 @@ Editor type `select` allows the user to pick items from a select, providing mult
409409
```
410410

411411
To correctly define options for multiselect, you need to define the `items` property and then provide values and (optionally) labels in `enum` and `enumTitles` properties.
412+
413+
### Resource
414+
415+
The Resource property enables Actor users to select different types of resources.
416+
Currently, it supports storage resources, allowing the selection of a Dataset, Key-Value Store, or Request Queue.
417+
418+
For Actor developers, the resource input value is a string representing the storage ID.
419+
The type of the property is either `string` or `array` (for multiple resources).
420+
In the user interface, a picker is provided for easy selection, where users can search and choose from their own storages or those they have access to.
421+
422+
Example of a Dataset input:
423+
424+
```json
425+
{
426+
"title": "Dataset",
427+
"type": "string",
428+
"description": "Select a dataset",
429+
"resourceType": "dataset"
430+
}
431+
```
432+
433+
Rendered input:
434+
435+
![Apify Actor input schema dataset](./images/input-schema-dataset.png)
436+
437+
JSON value:
438+
439+
![Apify Actor input schema dataset](./images/input-schema-dataset-json.png)
440+
441+
Properties:
442+
443+
| Property | Value | Required | Description |
444+
|----------------|-----------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------|
445+
| `type` | One of <ul><li>`string`</li><li>`array`</li></ul> | Yes | Specifies the type of input - string for single value or array for multiple values |
446+
| `editor` | One of <ul><li>`resourcePicker`</li><li>`hidden`</li></ul> | No | Visual editor used for <br/>the input field. Defaults to `resourcePicker`. |
447+
| `resourceType` | One of <ul><li>`dataset`</li><li>`keyValueStore`</li><li>`requestQueue`</li></ul> | Yes | Type of resource |
448+
| `minItems` | Integer | No | Minimum number of items the array can contain. Only for `type: array` |
449+
| `maxItems` | Integer | No | Maximum number of items the array can contain. Only for `type: array` |

0 commit comments

Comments
 (0)