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
Add notes about `isSecret` availability for `object`/`array` inputs.
Context: apify/apify-shared-js#515
---------
Co-authored-by: Michał Olender <92638966+TC-MO@users.noreply.github.com>
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.
41
+
40
42
:::note Type restriction
41
43
42
-
This is only available for `string` inputs, and the editor type is limited to `textfield` or `textarea`.
44
+
This feature supports `string`, `object`, and `array` input types. Available editor types include:
45
+
46
+
-`hidden` (for any supported input type)
47
+
-`textfield` and `textarea` (for string inputs)
48
+
-`json` (for `object` and `array` inputs)
43
49
44
50
:::
45
51
46
52
## Read secret input fields
47
53
48
-
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).
54
+
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.
Copy file name to clipboardExpand all lines: sources/platform/actors/development/actor_definition/input_schema/specification.md
+20-18Lines changed: 20 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -243,16 +243,16 @@ The user provides either a URL or uploads the file to a key-value store (existin
243
243
244
244
Properties:
245
245
246
-
| Property | Value | Required | Description |
247
-
|----------|--------|-----------|-------------|
248
-
|`editor`| One of:<br/>- `textfield`<br/>- `textarea`<br/>- `javascript`<br/>- `python`<br/>- `select`<br/>- `datepicker`<br/>- `fileupload`<br/>- `hidden`| Yes | Visual editor used for the input field. |
249
-
|`pattern`| String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. |
250
-
|`minLength`| Integer | No | Minimum length of the string. |
251
-
|`maxLength`| Integer | No | Maximum length of the string. |
252
-
|`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. |
253
-
|`enumTitles`|[String]| No | Titles for the `enum` keys described. |
254
-
|`nullable`| Boolean | No | Specifies whether `null` is an allowed value. |
255
-
|`isSecret`| Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `textfield`and `textarea` editors. |
| `editor` | One of:<br/>- `textfield`<br/>- `textarea`<br/>- `javascript`<br/>- `python`<br/>- `select`<br/>- `datepicker`<br/>- `fileupload`<br/>- `hidden` | Yes | Visual editor used for the input field. |
249
+
|`pattern`| String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. |
250
+
|`minLength`| Integer | No | Minimum length of the string. |
251
+
|`maxLength`| Integer | No | Maximum length of the string. |
252
+
| `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. |
253
+
|`enumTitles`|[String]| No | Titles for the `enum` keys described. |
254
+
|`nullable`| Boolean | No | Specifies whether `null` is an allowed value. |
255
+
|`isSecret`| Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `textfield`, `textarea`and `hidden` editors.|
256
256
| `dateType` | One of <ul><li>`absolute`</li><li>`relative`</li><li>`absoluteOrRelative`</li></ul> | 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.).<br/><br/><ul><li>`absolute` value enables date input in `YYYY-MM-DD` format. To parse returned string regex like this can be used: `^(\d{4})-(0[1-9]\|1[0-2])-(0[1-9]\|[12]\d\|3[01])$`.</li><br/><li>`relative` value enables relative date input in <br/>`{number} {unit}` format. <br/>Supported units are: days, weeks, months, years.<br/><br/>The input is passed to the Actor as plain text (e.g., "3 weeks"). To parse it, regex like this can be used: `^(\d+)\s*(day\|week\|month\|year)s?$`.</li><br/><li>`absoluteOrRelative` value enables both absolute and relative formats and user can switch between them. It's up to Actor author to parse a determine actual used format - regexes above can be used to check whether the returned string match one of them.</li></ul><br/>Defaults to `absolute`. |
257
257
258
258
:::note Regex escape
@@ -393,14 +393,15 @@ Rendered input:
393
393
394
394
Properties:
395
395
396
-
| Property | Value | Required | Description |
397
-
| --- | --- | --- | --- |
398
-
|`editor`| One of <ul><li>`json`</li><li>`proxy`</li><li>`hidden`</li></ul> | Yes | UI editor used for input. |
399
-
|`patternKey`| String | No | Regular expression that will be used <br/>to validate the keys of the object. |
400
-
|`patternValue`| String | No | Regular expression that will be used <br/>to validate the values of object. |
401
-
|`maxProperties`| Integer | No | Maximum number of properties <br/>the object can have. |
402
-
|`minProperties`| Integer | No | Minimum number of properties <br/>the object can have. |
403
-
|`nullable`| Boolean | No | Specifies whether null is <br/>an allowed value. |
0 commit comments