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

connect.sid
string
cookie
required

Cookie-based authentication

Query Parameters

filter
enum<string>

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

success
boolean

Operation was successful

userDefinedFunctions
object[]