Type "json"
Last updated
Was this helpful?
Last updated
Was this helpful?
Sometimes your function needs more complex data as input: let's say that you need a JSON service account to authenticate against a third-party API. You can use environment variables of type json in your implementation, and then our platform will ask consumers to enter their value during installation.
The type json variables allow the consumers of a function to enter any json object valid, which you need to define using the schema prop. This type is presented in the installation UI form as a JSON input (see image below), but ultimately you can only access them as strings in your function implementation.
property
type
required
default
description
name
string
yes
-
The name of the environment variable. This should be unique for each variable.
description
string
no
-
The description of the environment variable.
default
json
no
-
The default value for the variable.
required
bool
no
false
Specifies that a variable must be filled out before submitting.
schema
json
yes
-
The schema will define the structure of the expected object when the "type": "json". This prop is required when the "type": "json".