Actions
Actions are a set of instructions an interface will run when called.
Options
Name | Type | Description |
---|---|---|
name | string (required) | The name of the action |
run_when_finished (alias depends_on ) | array[string] or object | Run this action if the specified action(s) has finished. |
run_when_succeeded | array[string] or object | Run this action if the specified action(s) has succeeded. |
run_when_failed | array[string] or object | Run this action if the specified action(s) has failed. |
run_on_assertion | object | Run this action if the assertion passes |
input | string (optional) | The data available when an interface is called
Note inputs do not have trailing | pipes |
hide_data_on_success | boolean(optional) | Hide data from the response payload on success. |
hide_data_on_error | boolean(optional) | Hide data from the response payload on error. |
database | string (optional) | A database which your action will interact with. |
query | string (optional) | The query to be run on the specified database. |
params | array[string] (optional) | Array of parameters available for the actions to use |
assert | an array of test cases used to validate your data and inputs. See here for more details. | |
post_transforms | an array of functions which are used to transform your data after it is received. See here for more details. | |
email | A set of options to configure email responses. | |
http | A set of options for an action to make http requests to do some sort of activity | |
command | Run terminal commands:
| |
retry | object (optional) | Options:
|
pre_log | array (optional) | Options:
|
post_log | array (optional) | Options:
|
timeout | string (required) | milliseconds |