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/actors/development/actor_definition/input_schema/specification.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -409,3 +409,56 @@ Editor type `select` allows the user to pick items from a select, providing mult
409
409
```
410
410
411
411
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 type
414
+
415
+
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.
416
+
Currently, it supports storage resources only, allowing the reference 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`. In case of `array` (for multiple resources) the return value is an array of IDs.
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
+

436
+
437
+
The returned value is resource reference, in this example it's the dataset ID as can be seen in the JSON tab:
438
+
439
+

440
+
441
+
Example of multiple datasets input:
442
+
443
+
```json
444
+
{
445
+
"title": "Datasets",
446
+
"type": "array",
447
+
"description": "Select multiple datasets",
448
+
"resourceType": "dataset"
449
+
}
450
+
```
451
+
452
+
Rendered input:
453
+
454
+

|`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 |
461
+
|`editor`| One of <ul><li>`resourcePicker`</li><li>`hidden`</li></ul> | No | Visual editor used for <br/>the input field. Defaults to `resourcePicker`. |
462
+
|`resourceType`| One of <ul><li>`dataset`</li><li>`keyValueStore`</li><li>`requestQueue`</li></ul> | Yes | Type of Apify Platform resource |
463
+
|`minItems`| Integer | No | Minimum number of items the array can contain. Only for `type: array`|
464
+
|`maxItems`| Integer | No | Maximum number of items the array can contain. Only for `type: array`|
0 commit comments