diff --git a/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-dataset-json.png b/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-dataset-json.png new file mode 100644 index 000000000..891540ddf Binary files /dev/null and b/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-dataset-json.png differ diff --git a/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-dataset.png b/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-dataset.png new file mode 100644 index 000000000..274fe7ad5 Binary files /dev/null and b/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-dataset.png differ diff --git a/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-datasets.png b/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-datasets.png new file mode 100644 index 000000000..14b0899f1 Binary files /dev/null and b/sources/platform/actors/development/actor_definition/input_schema/images/input-schema-datasets.png differ diff --git a/sources/platform/actors/development/actor_definition/input_schema/specification.md b/sources/platform/actors/development/actor_definition/input_schema/specification.md index db8a7b7d5..1548f988b 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/specification.md +++ b/sources/platform/actors/development/actor_definition/input_schema/specification.md @@ -409,3 +409,56 @@ Editor type `select` allows the user to pick items from a select, providing mult ``` 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. + +### Resource type + +Resource type identifies what kind of Apify Platform object is referred to in the input field. For example, the Key-value store resource type can be referred to using a string ID. +Currently, it supports storage resources only, allowing the reference of a Dataset, Key-Value Store or Request Queue. + +For Actor developers, the resource input value is a string representing the storage ID. +The type of the property is either `string` or `array`. In case of `array` (for multiple resources) the return value is an array of IDs. +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. + +Example of a Dataset input: + +```json +{ + "title": "Dataset", + "type": "string", + "description": "Select a dataset", + "resourceType": "dataset" +} +``` + +Rendered input: + +![Apify Actor input schema dataset](./images/input-schema-dataset.png) + +The returned value is resource reference, in this example it's the dataset ID as can be seen in the JSON tab: + +![Apify Actor input schema dataset](./images/input-schema-dataset-json.png) + +Example of multiple datasets input: + +```json +{ + "title": "Datasets", + "type": "array", + "description": "Select multiple datasets", + "resourceType": "dataset" +} +``` + +Rendered input: + +![Apify Actor input schema datasets](./images/input-schema-datasets.png) + +Properties: + +| Property | Value | Required | Description | +|----------------|-----------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------| +| `type` | One of