curl --request GET \
--url https://api.example.com/v3/fql-expressions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v3/fql-expressions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v3/fql-expressions', 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/v3/fql-expressions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/v3/fql-expressions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v3/fql-expressions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/fql-expressions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_version": "3.0",
"kind": "NORMAL",
"data": {
"functions": [
{
"name": "count",
"category": "aggregate",
"grouping": "aggregation",
"description": "Returns the number of non-null rows of a column or row expression",
"parameters": [
{
"name": "expr",
"type": "any",
"is_required": true,
"kind": "positional"
}
],
"return_type": "number"
},
{
"name": "if",
"category": "row",
"grouping": "logical",
"description": "Evaluates condition and returns one of two values",
"parameters": [
{
"name": "expr1",
"type": "boolean",
"is_required": true,
"kind": "positional"
},
{
"name": "expr2",
"type": "any",
"is_required": true,
"kind": "positional"
},
{
"name": "expr3",
"type": "any",
"is_required": true,
"kind": "positional"
}
],
"return_type": "any"
},
{
"name": "quantile",
"category": "aggregate",
"grouping": "aggregation",
"description": "Returns the value at a given quantile level",
"parameters": [
{
"name": "expr",
"type": "number",
"is_required": true,
"kind": "positional"
},
{
"name": "level",
"type": "number",
"is_required": false,
"default": 0.5,
"kind": "keyword"
}
],
"return_type": "number"
},
{
"name": "attribute",
"category": "row",
"grouping": "attribute",
"description": "References a Gen AI span or session attribute by name",
"parameters": [
{
"name": "scope",
"type": "string",
"is_required": true,
"allowed_values": [
"span"
],
"kind": "keyword"
},
{
"name": "name",
"type": "string",
"is_required": true,
"kind": "keyword"
},
{
"name": "value",
"type": "string",
"is_required": false,
"kind": "keyword"
}
],
"return_type": "any"
}
]
}
}{
"api_version": "3.0",
"kind": "ERROR",
"error": {
"code": 400,
"message": "Resource Not Found",
"errors": [
{
"reason": "ResourceNotFoundException",
"message": "Resource Not Found",
"help": "<string>"
}
]
}
}{
"api_version": "3.0",
"kind": "ERROR",
"error": {
"code": 400,
"message": "Resource Not Found",
"errors": [
{
"reason": "ResourceNotFoundException",
"message": "Resource Not Found",
"help": "<string>"
}
]
}
}{
"api_version": "3.0",
"kind": "ERROR",
"error": {
"code": 400,
"message": "Resource Not Found",
"errors": [
{
"reason": "ResourceNotFoundException",
"message": "Resource Not Found",
"help": "<string>"
}
]
}
}List available FQL functions
Returns the list of FQL functions available for GenAI custom metrics, including function metadata, parameter definitions, and return types. The response is used by the frontend for autocomplete suggestions, signature hints, and documentation in the FQL editor.
Currently returns GenAI functions only (from the GenAI function registry plus the attribute construct). Extensible to ML context in the future via a query parameter.
curl --request GET \
--url https://api.example.com/v3/fql-expressions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v3/fql-expressions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v3/fql-expressions', 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/v3/fql-expressions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/v3/fql-expressions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v3/fql-expressions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/fql-expressions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_version": "3.0",
"kind": "NORMAL",
"data": {
"functions": [
{
"name": "count",
"category": "aggregate",
"grouping": "aggregation",
"description": "Returns the number of non-null rows of a column or row expression",
"parameters": [
{
"name": "expr",
"type": "any",
"is_required": true,
"kind": "positional"
}
],
"return_type": "number"
},
{
"name": "if",
"category": "row",
"grouping": "logical",
"description": "Evaluates condition and returns one of two values",
"parameters": [
{
"name": "expr1",
"type": "boolean",
"is_required": true,
"kind": "positional"
},
{
"name": "expr2",
"type": "any",
"is_required": true,
"kind": "positional"
},
{
"name": "expr3",
"type": "any",
"is_required": true,
"kind": "positional"
}
],
"return_type": "any"
},
{
"name": "quantile",
"category": "aggregate",
"grouping": "aggregation",
"description": "Returns the value at a given quantile level",
"parameters": [
{
"name": "expr",
"type": "number",
"is_required": true,
"kind": "positional"
},
{
"name": "level",
"type": "number",
"is_required": false,
"default": 0.5,
"kind": "keyword"
}
],
"return_type": "number"
},
{
"name": "attribute",
"category": "row",
"grouping": "attribute",
"description": "References a Gen AI span or session attribute by name",
"parameters": [
{
"name": "scope",
"type": "string",
"is_required": true,
"allowed_values": [
"span"
],
"kind": "keyword"
},
{
"name": "name",
"type": "string",
"is_required": true,
"kind": "keyword"
},
{
"name": "value",
"type": "string",
"is_required": false,
"kind": "keyword"
}
],
"return_type": "any"
}
]
}
}{
"api_version": "3.0",
"kind": "ERROR",
"error": {
"code": 400,
"message": "Resource Not Found",
"errors": [
{
"reason": "ResourceNotFoundException",
"message": "Resource Not Found",
"help": "<string>"
}
]
}
}{
"api_version": "3.0",
"kind": "ERROR",
"error": {
"code": 400,
"message": "Resource Not Found",
"errors": [
{
"reason": "ResourceNotFoundException",
"message": "Resource Not Found",
"help": "<string>"
}
]
}
}{
"api_version": "3.0",
"kind": "ERROR",
"error": {
"code": 400,
"message": "Resource Not Found",
"errors": [
{
"reason": "ResourceNotFoundException",
"message": "Resource Not Found",
"help": "<string>"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
List of available FQL functions retrieved successfully.
Response object for standard API responses.
API version.
2.0, 3.0 Type of response, indicating a normal response.
NORMAL Response containing the list of available FQL functions for GenAI custom metrics. The top-level structure is extensible — future versions may add additional keys (e.g., keywords, fields) without breaking existing consumers.
Show child attributes
Show child attributes