settings
Get User Defined Functions
API Dokumentation
ticket
- GETGet next ticket id to work on
- POSTGet a list of tickets
- POSTCreate a ticket
- PATCHUpdate a few tickets at once
- GETGet a ticket
- PATCHUpdate a ticket
- GETGet ticket variables
- GETGet a tickets history
- POSTForward a ticket
- POSTAuto-execute a ticket
- GETPing a ticket
- GETGet ticket activity
- GETGet ticket stats
- GETGet agent queue status
customer
intent
aiAgent
- GETList of all available AI agents as an array
- GETList of all available AI agents as an tree based on associated tag
- POSTLoad enneo default AI Agents
- POSTCreate a new aiAgent
- GETGet an AI Agent by id
- DELDelete an existing AI Agent
- PATCHUpdate an existing AI Agent
- GETGet similar tickets for an AI Agent
- POSTPreview an AI Agent
- POSTGet the outcome of an AI Agent
aiQualityCheck
- GETGet all test runs with pagination
- POSTSchedule a new AI quality check
- GETGet a specific test run by ID
- DELDelete a specific test run by ID
- PATCHUpdate the expected result of a test ticket
- PATCHAccept the expected result of a test ticket
- POSTAccept ALL the expected results of for a test run
- GETGet all AI agents for which test runs can be triggered
- GETGet all AI agents for which test runs can be triggered
- GETGet test cases by AI agent ID
- POSTAdd test cases for an AI agent
- DELDelete a test case by ID
- PATCHUpdate a test case by ID
intentTemplate
profile
team
reminder
settings
- GETGet settings of a client
- POSTUpdate multiple settings at once
- GETGet settings of a client and return the results in a compact form
- GETGet settings of a client in a grouped way for a category
- PUTUpdate setting
- GETSearch settings
- GETGet Subchannels
- POSTAdd a new Subchannel
- DELDelete a Subchannel
- GETGet User Defined Functions
- POSTAdd a new User Defined Function
- DELDelete a User Defined Function
- GETRedirect to Microsoft authorization page
- GETCallback for Microsoft authorization
tag
cron
version
knowledgeSourceStructure
knowledgeSource
pcProxy
cortex
settings
Get User Defined Functions
A user-defined function (UDF) is a function that you can define yourself and use in your queries. It is a way to extend the functionality of the database.
GET
/
settings
/
user-defined-function
curl --request GET \
--url https://demo.enneo.ai/api/mind/settings/user-defined-function
{
"success": true,
"userDefinedFunctions": [
{
"id": 1,
"type": "tool",
"data": {
"udfExecutor": {
"id": 1,
"code": "<?php\n\n// Load enneo SDK. Input is made available through $in\nuse EnneoSDK\\Api;\nuse EnneoSDK\\ApiEnneo;\nrequire(getenv()['SDK']);\n\nfunction exampleApiCall(string $method, string $api, array|object|string|false $params = false, $attempt = 1): stdClass|array\n{\n // load token\n $token = ApiEnneo::executeUdf('fetchToken', [])->token;\n\n // make request\n $res = Api::call(\n method: $method,\n url: sprintf('urlExampleHere', $api),\n headers: [\n sprintf('Authorization: Bearer %s', $token),\n 'x-api-key: tokenExampleHere',\n 'Accept: application/json'\n ],\n params: $params\n );\n\n return $res;\n}\n\necho json_encode(exampleApiCall($in->method, $in->api, $in->params));",
"type": "sourceCode",
"language": "php82",
"packages": "",
"parameters": {}
}
},
"name": "exampleApiCall"
}
]
}
Authorizations
Cookie-based authentication
Query Parameters
Filter by type of user defined function. If 'tool', only tool functions are returned. If 'udf', only non-tool functions are returned.
Available options:
tool
, udf
Response
200
application/json
Successful operation
Data format of Enneo success messages
Operation was successful
Available options:
tool
, udf
curl --request GET \
--url https://demo.enneo.ai/api/mind/settings/user-defined-function
{
"success": true,
"userDefinedFunctions": [
{
"id": 1,
"type": "tool",
"data": {
"udfExecutor": {
"id": 1,
"code": "<?php\n\n// Load enneo SDK. Input is made available through $in\nuse EnneoSDK\\Api;\nuse EnneoSDK\\ApiEnneo;\nrequire(getenv()['SDK']);\n\nfunction exampleApiCall(string $method, string $api, array|object|string|false $params = false, $attempt = 1): stdClass|array\n{\n // load token\n $token = ApiEnneo::executeUdf('fetchToken', [])->token;\n\n // make request\n $res = Api::call(\n method: $method,\n url: sprintf('urlExampleHere', $api),\n headers: [\n sprintf('Authorization: Bearer %s', $token),\n 'x-api-key: tokenExampleHere',\n 'Accept: application/json'\n ],\n params: $params\n );\n\n return $res;\n}\n\necho json_encode(exampleApiCall($in->method, $in->api, $in->params));",
"type": "sourceCode",
"language": "php82",
"packages": "",
"parameters": {}
}
},
"name": "exampleApiCall"
}
]
}