Global Functions
Lists the module's global function scripts, in the name order they compile in
Enter your Workspace API key.
API keys can be generated and managed within the Workspace Integration settings in the Ninox app.
Module name
crmPattern: ^[a-z0-9_]+$Workspace ID
5rdco4s18swuPattern: ^[a-z0-9]+$Scripts retrieved successfully
Unauthorized
Workspace or module not found
GET /api/v1/workspace/{workspaceId}/modules/{moduleName}/functions HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"code": "text",
"id": "text",
"moduleName": "text",
"name": "text"
}
]
}Creates a script of global function definitions, callable from every script of the module. The code may only define functions and is compiled with the functions of the scripts before it by name. Needs schema:write plus records:write.
Enter your Workspace API key.
API keys can be generated and managed within the Workspace Integration settings in the Ninox app.
Module name
crmPattern: ^[a-z0-9_]+$Workspace ID
5rdco4s18swuPattern: ^[a-z0-9]+$Function definitions only, callable from every script of the module. Needs schema:write plus records:write
Script name, scripts compile in name order
Script created successfully
Code does not compile or defines more than functions
Unauthorized
Missing records:write
Workspace or module not found
A script with that name already exists
POST /api/v1/workspace/{workspaceId}/modules/{moduleName}/functions HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"code": "text",
"name": "text"
}{
"data": {
"code": "text",
"id": "text",
"moduleName": "text",
"name": "text"
}
}Retrieves a global function script by name
Enter your Workspace API key.
API keys can be generated and managed within the Workspace Integration settings in the Ninox app.
Module name
crmPattern: ^[a-z0-9_]+$Workspace ID
5rdco4s18swuPattern: ^[a-z0-9]+$Global function script name
helpersScript retrieved successfully
Unauthorized
Workspace, module or script not found
GET /api/v1/workspace/{workspaceId}/modules/{moduleName}/functions/{scriptName} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"code": "text",
"id": "text",
"moduleName": "text",
"name": "text"
}
}Deletes a global function script. Scripts after it that call its functions are not checked again. Needs records:write
Enter your Workspace API key.
API keys can be generated and managed within the Workspace Integration settings in the Ninox app.
Module name
crmPattern: ^[a-z0-9_]+$Workspace ID
5rdco4s18swuPattern: ^[a-z0-9]+$Global function script name
helpersScript deleted successfully
Unauthorized
Missing records:write
Workspace, module or script not found
DELETE /api/v1/workspace/{workspaceId}/modules/{moduleName}/functions/{scriptName} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"id": "text"
}
}Updates or renames a global function script. The result is compiled again with the functions of the scripts before it by name. Scripts after it that call its functions are not checked again. Needs schema:write plus records:write.
Enter your Workspace API key.
API keys can be generated and managed within the Workspace Integration settings in the Ninox app.
Module name
crmPattern: ^[a-z0-9_]+$Workspace ID
5rdco4s18swuPattern: ^[a-z0-9]+$Global function script name
helpersFunction definitions only, callable from every script of the module. Needs schema:write plus records:write
Script name, scripts compile in name order
Script updated successfully
Code does not compile or defines more than functions
Unauthorized
Missing records:write
Workspace, module or script not found
A script with the new name already exists
PATCH /api/v1/workspace/{workspaceId}/modules/{moduleName}/functions/{scriptName} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"code": "text",
"name": "text"
}{
"data": {
"code": "text",
"id": "text",
"moduleName": "text",
"name": "text"
}
}Last updated
Was this helpful?