Application Program Extension
Hexabase allows you to add extended scripts for each application. This is called a function. Functions allow you to execute code without server or container management.
ActionScript associates scripts with actions, but function scripts can be installed for each application without any actions.
After registering the extension script, executing the API will execute the corresponding code.
Add or edit function scripts
Function scripts can be added and edited in [ApplicationSettings] > [ProgramExtensions]. See below for details
- Admin panel reference > Application > Function
Call a function script
A function script is called by specifying a function ID (:function-id) from the API.
End point
/api/v0/applications/:project-id/functions/:function-id
payload
{
"key1" : "value",
"key2" : "value"
}
All of the specified payload's json is passed to the script's data.params.
response
{
data: {}, // The value returned by the script will be returned
errors: [] // If an error occurs in the script, the error details will be returned.
}