Parameters
A parameter is a variable assigned to a value. In other words, the parameter name is the container and the parameter value is the information contained in it. So, parameters usually exist as key-value pairs. They allow you to build a logical script into which actual input data can be passed during an automation.
Type=JSONArray
Parameters are used to store inputs from the user.
We can give multiple Parameters to a particular extension.
Key | Type | Description | Value |
name | String | Name for the parameter | Name of the parameter. It should be a unique value. |
default | String | Default value for the parameter | Value of the parameter |
type | String | Data type of the parameter | text, text_area, checkbox, hidden |
is_mandatory | Boolean | Configuration mandatory or not. default value: false | true or false |
is_secure | Boolean | Setting this to "true" prevents user from seeing sensitive information in the parameter when making HTTP request. default value: false | true or false |
scope | string | It is use for the parameters to allow access to all members of the workspace or specific members alone. | "org", "user" |
Example
If you're using functions in your extension, you can store your function UUID and Version. Now you can call the function every time by the parameters name and version.
SNIPPET
Storing Associated function uuid and version
Copied{
"modules": {
"parameters": [{
"default": "5a748580-7987-4ec5-8545-2101b8e3efcc",
"name": "add_attachment_function_uuid",
"is_mandatory": false,
"type": "hidden"
}, {
"default": "1.0",
"name": "add_attachment_function_version",
"is_mandatory": false,
"type": "hidden"
}]
}
}
HTTP request SNIPPET to depict usage of parameter value injection:
SNIPPET
URL construction:
/zsapi/team/784663487/extensions/6774743767436743/functions?functionUuid={{parameters.add_attachment_function_uuid}}&version={{parameters.add_attachment_function_version}}
In the function uuid parameter, you can use the parameters value by providing parameters name as in the above API.
Same for the Version also.
parameters – is the default prefix.
add_attachment_function_uuid – parameter name.
add_attachment_function_version – parameter name.
Note: Parameters value will be replaced by Zoho Sprints.