action – functions
This call is used to get the metadata on all available functions that can be used in PYXI
calculations, whether on their own, in scripts or templates. This is
designed to assist external applications in providing help information on these functions.
Note that the available functions should not vary by account, but it is still necessary to pass an account
and apikey to pass standard API calling security.
Pass the action functions – the list of functions will be returned as an array in functions.
For each function, the array key is the function name (in lower-case – function names are not case-sensitive),
and the sub-array for that function contains some or all the following:
- display – HTML showing the calling syntax of the function
- type – the function’s return value type (string, date, datetime, number, Boolean etc.)
- category – a logical category into which the function fits. This is solely for the purpose of grouping the functions in documentation.
- argCount – the fixed number of arguments required by the function. In some cases, where the argument count
is variable, this is replaced with two elements – minArgCount and maxArgCount
- description – a fuller HTML description of the purpose and behaviour of the function
Sample Request
{
"account": *** your account id ***,
"apikey": "*** your api key ***",
"action": "functions"
}
Sample Response
{
"success": true,
"functions": {
"dateformat": {
"display": "dateFormat(<i>date</i>…",
"type": "string",
"category": "Date",
"minArgCount": 1,
"maxArgCount": 2,
"description": "Display <i>date</i> …"
},
"today": {
…
} …
}
}