List Functions
curl --request GET \
--url https://api.example.com/api/functions/import requests
url = "https://api.example.com/api/functions/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/functions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/functions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/functions/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/functions/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/functions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"functions": [
{
"id": "<string>",
"user_id": "<string>",
"type": "<string>",
"name": "<string>",
"content": "<string>",
"meta": {},
"is_active": true,
"is_global": true,
"user": {},
"updated_at": 123,
"created_at": 123
}
]
}Functions & Tools
List Functions
Retrieve all functions or function list with user information
GET
/
api
/
functions
/
List Functions
curl --request GET \
--url https://api.example.com/api/functions/import requests
url = "https://api.example.com/api/functions/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/functions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/functions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/functions/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/functions/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/functions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"functions": [
{
"id": "<string>",
"user_id": "<string>",
"type": "<string>",
"name": "<string>",
"content": "<string>",
"meta": {},
"is_active": true,
"is_global": true,
"user": {},
"updated_at": 123,
"created_at": 123
}
]
}Endpoints
Get Functions
curl -X GET "https://your-instance.com/api/functions/" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
array
Array of function objects
Show FunctionResponse properties
Show FunctionResponse properties
string
required
Unique identifier for the function
string
required
ID of the user who created the function
string
required
Function type (e.g., “filter”, “action”)
string
required
Display name of the function
object
required
boolean
required
Whether the function is currently active
boolean
required
Whether the function is globally available
integer
required
Unix timestamp of last update
integer
required
Unix timestamp of creation
Get Function List (Admin)
curl -X GET "https://your-instance.com/api/functions/list" \
-H "Authorization: Bearer YOUR_ADMIN_API_KEY"
Response
array
Array of function objects with user details
Show FunctionUserResponse properties
Show FunctionUserResponse properties
string
required
Function identifier
string
required
Creator user ID
string
required
Function type
string
required
Function name
string
required
Function source code
object
required
Function metadata
boolean
required
Active status
boolean
required
Global availability
object
User information of the function creator
integer
required
Last update timestamp
integer
required
Creation timestamp
Export Functions (Admin)
curl -X GET "https://your-instance.com/api/functions/export?include_valves=true" \
-H "Authorization: Bearer YOUR_ADMIN_API_KEY"
Query Parameters
boolean
default:"false"
Include valve configurations in the export
Response
Returns an array ofFunctionModel or FunctionWithValvesModel objects depending on the include_valves parameter.
Authentication
All endpoints require authentication via bearer token. The/list and /export endpoints require admin privileges.