From 944a82fbb43e7ae67ec4ab09f943a950fcd604c5 Mon Sep 17 00:00:00 2001 From: martinforejt Date: Thu, 10 Jul 2025 13:00:16 +0200 Subject: [PATCH 1/5] docs: Secret object/array inputs --- .../input_schema/secret_input.md | 4 +- .../input_schema/specification.md | 38 ++++++++++--------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md index 41a17fa4ec..17fbf53b18 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md +++ b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md @@ -37,9 +37,11 @@ The editor for this input field will then turn into a secret input, and when you Secret input editor +When running the Actor through the API, input fields marked as secret are also encrypted automatically before being saved in the Actor run's default key-value store. + :::note Type restriction -This is only available for `string` inputs, and the editor type is limited to `textfield` or `textarea`. +This feature supports `string`, `object`, and `array` inputs. The available editor types are `hidden` (for any of these), `textfield` and `textarea` (for `string` input), and `json` (for `object` and `array` inputs). ::: 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 f376c6d27d..2bb9b8f636 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/specification.md +++ b/sources/platform/actors/development/actor_definition/input_schema/specification.md @@ -243,16 +243,16 @@ The user provides either a URL or uploads the file to a key-value store (existin Properties: -| Property | Value | Required | Description | -|----------|--------|-----------|-------------| -| `editor` | One of:
- `textfield`
- `textarea`
- `javascript`
- `python`
- `select`
- `datepicker`
- `fileupload`
- `hidden` | Yes | Visual editor used for the input field. | -| `pattern` | String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. | -| `minLength` | Integer | No | Minimum length of the string. | -| `maxLength` | Integer | No | Maximum length of the string. | -| `enum` | [String] | Required if `editor` is `select` | Using this field, you can limit values to the given array of strings. Input will be displayed as select box. | -| `enumTitles` | [String] | No | Titles for the `enum` keys described. | -| `nullable` | Boolean | No | Specifies whether `null` is an allowed value. | -| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `textfield` and `textarea` editors. | +| Property | Value | Required | Description | +|----------|--------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `editor` | One of:
- `textfield`
- `textarea`
- `javascript`
- `python`
- `select`
- `datepicker`
- `fileupload`
- `hidden` | Yes | Visual editor used for the input field. | +| `pattern` | String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. | +| `minLength` | Integer | No | Minimum length of the string. | +| `maxLength` | Integer | No | Maximum length of the string. | +| `enum` | [String] | Required if `editor` is `select` | Using this field, you can limit values to the given array of strings. Input will be displayed as select box. | +| `enumTitles` | [String] | No | Titles for the `enum` keys described. | +| `nullable` | Boolean | No | Specifies whether `null` is an allowed value. | +| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `textfield`, `textarea` and `hidden` editors. | | `dateType` | One of | No | This property, which is only available with `datepicker` editor, specifies what date format should visual editor accept (The JSON editor accepts any string without validation.).


Defaults to `absolute`. | :::note Regex escape @@ -393,14 +393,15 @@ Rendered input: Properties: -| Property | Value | Required | Description | -| --- | --- | --- | --- | -| `editor` | One of | Yes | UI editor used for input. | -| `patternKey` | String | No | Regular expression that will be used
to validate the keys of the object. | -| `patternValue` | String | No | Regular expression that will be used
to validate the values of object. | -| `maxProperties` | Integer | No | Maximum number of properties
the object can have. | -| `minProperties` | Integer | No | Minimum number of properties
the object can have. | -| `nullable` | Boolean | No | Specifies whether null is
an allowed value. | +| Property | Value | Required | Description | +| --- | --- | --- |--------------------------------------------------------------------------------------------------------------| +| `editor` | One of | Yes | UI editor used for input. | +| `patternKey` | String | No | Regular expression that will be used
to validate the keys of the object. | +| `patternValue` | String | No | Regular expression that will be used
to validate the values of object. | +| `maxProperties` | Integer | No | Maximum number of properties
the object can have. | +| `minProperties` | Integer | No | Minimum number of properties
the object can have. | +| `nullable` | Boolean | No | Specifies whether null is
an allowed value. | +| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `json` and `hidden` editors. | ### Array @@ -450,6 +451,7 @@ Properties: | `uniqueItems` | Boolean | No | Specifies whether the array
should contain only unique values. | | `nullable` | Boolean | No | Specifies whether null is
an allowed value. | | `items` | object | No | Specifies format of the items of the array, useful mainly for multiselect (see below) | +| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `json` and `hidden` editors. | Usage of this field is based on the selected editor: From 97a13d7e0626fb0a7c9136a258c9ebd3dd3617c9 Mon Sep 17 00:00:00 2001 From: martinforejt Date: Wed, 16 Jul 2025 12:56:15 +0200 Subject: [PATCH 2/5] mention sdk versions --- .../development/actor_definition/input_schema/secret_input.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md index 17fbf53b18..97f5c2629b 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md +++ b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md @@ -47,7 +47,7 @@ This feature supports `string`, `object`, and `array` inputs. The available edit ## Read secret input fields -When you read the Actor input through `Actor.getInput()`, the encrypted fields are automatically decrypted (starting with the [`apify` package](https://www.npmjs.com/package/apify) version 3.1.0). +When you read the Actor input through `Actor.getInput()`, the encrypted fields are automatically decrypted. Decryption of string fields is supported since [JavaScript SDK](http://docs.apify.loc/sdk/js/) 3.1.0; support for objects and arrays was added in [JavaScript SDK](http://docs.apify.loc/sdk/js/) 3.4.2 and [Python SDK](http://docs.apify.loc/sdk/python/) 2.7.0. ```js From 97c991cc880dcdb5089e8fe2e23e023b79f036ae Mon Sep 17 00:00:00 2001 From: Martin Forejt Date: Mon, 21 Jul 2025 17:15:50 +0200 Subject: [PATCH 3/5] Update sources/platform/actors/development/actor_definition/input_schema/secret_input.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michał Olender <92638966+TC-MO@users.noreply.github.com> --- .../development/actor_definition/input_schema/secret_input.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md index 97f5c2629b..a0e0f82077 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md +++ b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md @@ -37,7 +37,7 @@ The editor for this input field will then turn into a secret input, and when you Secret input editor -When running the Actor through the API, input fields marked as secret are also encrypted automatically before being saved in the Actor run's default key-value store. +When you run the Actor through the API, the system automatically encrypts any input fields marked as secret before saving them to the Actor run's default key-value store. :::note Type restriction From 4983d01b95d48dd34b44c2bd65d1c7735aa9e031 Mon Sep 17 00:00:00 2001 From: Martin Forejt Date: Mon, 21 Jul 2025 17:15:59 +0200 Subject: [PATCH 4/5] Update sources/platform/actors/development/actor_definition/input_schema/secret_input.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michał Olender <92638966+TC-MO@users.noreply.github.com> --- .../actor_definition/input_schema/secret_input.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md index a0e0f82077..c7cbbd5e68 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md +++ b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md @@ -41,7 +41,11 @@ When you run the Actor through the API, the system automatically encrypts any in :::note Type restriction -This feature supports `string`, `object`, and `array` inputs. The available editor types are `hidden` (for any of these), `textfield` and `textarea` (for `string` input), and `json` (for `object` and `array` inputs). +This feature supports `string`, `object`, and `array` input types. Available editor types include: + +- `hidded` (for any supported input type) +- `textfield` and `textarea` (for string inputs) +- `json` (for `object` and `array` inputs) ::: From 5cb88aca9d273797ad2681fe0f69a0b759dfad58 Mon Sep 17 00:00:00 2001 From: Martin Forejt Date: Mon, 21 Jul 2025 18:16:54 +0200 Subject: [PATCH 5/5] Update sources/platform/actors/development/actor_definition/input_schema/secret_input.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michał Olender <92638966+TC-MO@users.noreply.github.com> --- .../development/actor_definition/input_schema/secret_input.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md index c7cbbd5e68..6fbcc5a3d9 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md +++ b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md @@ -43,7 +43,7 @@ When you run the Actor through the API, the system automatically encrypts any in This feature supports `string`, `object`, and `array` input types. Available editor types include: -- `hidded` (for any supported input type) +- `hidden` (for any supported input type) - `textfield` and `textarea` (for string inputs) - `json` (for `object` and `array` inputs)