Create a cluster view
curl --request POST \
--url https://api.withsplendor.com/v1/views/cluster \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"datasets": [
"<string>"
],
"seed_queries": [
"<string>"
],
"k": 2,
"name": "<string>",
"tau": 1,
"time_range": {
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z",
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.withsplendor.com/v1/views/cluster"
payload = {
"datasets": ["<string>"],
"seed_queries": ["<string>"],
"k": 2,
"name": "<string>",
"tau": 1,
"time_range": {
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z",
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
datasets: ['<string>'],
seed_queries: ['<string>'],
k: 2,
name: '<string>',
tau: 1,
time_range: {
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z',
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.withsplendor.com/v1/views/cluster', 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.withsplendor.com/v1/views/cluster",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'datasets' => [
'<string>'
],
'seed_queries' => [
'<string>'
],
'k' => 2,
'name' => '<string>',
'tau' => 1,
'time_range' => [
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z',
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withsplendor.com/v1/views/cluster"
payload := strings.NewReader("{\n \"datasets\": [\n \"<string>\"\n ],\n \"seed_queries\": [\n \"<string>\"\n ],\n \"k\": 2,\n \"name\": \"<string>\",\n \"tau\": 1,\n \"time_range\": {\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\",\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withsplendor.com/v1/views/cluster")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"datasets\": [\n \"<string>\"\n ],\n \"seed_queries\": [\n \"<string>\"\n ],\n \"k\": 2,\n \"name\": \"<string>\",\n \"tau\": 1,\n \"time_range\": {\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\",\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/views/cluster")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"datasets\": [\n \"<string>\"\n ],\n \"seed_queries\": [\n \"<string>\"\n ],\n \"k\": 2,\n \"name\": \"<string>\",\n \"tau\": 1,\n \"time_range\": {\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\",\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-01-15T09:30:00Z",
"expires_at": "2026-01-15T09:30:00Z",
"from_search_id": "srch_8f2c",
"kind": "materialized",
"name": "Timeout errors",
"record_count": 1240,
"total": {
"relation": "eq",
"value": 1240
},
"view_id": "view_01H8Z3"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Views
Create a cluster view
Builds a view by semantic clustering: provide seed queries and a similarity threshold, and Splendor groups records by closeness to those seeds. Use this to organize a large, fuzzy result space into coherent groups.
POST
/
v1
/
views
/
cluster
Create a cluster view
curl --request POST \
--url https://api.withsplendor.com/v1/views/cluster \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"datasets": [
"<string>"
],
"seed_queries": [
"<string>"
],
"k": 2,
"name": "<string>",
"tau": 1,
"time_range": {
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z",
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.withsplendor.com/v1/views/cluster"
payload = {
"datasets": ["<string>"],
"seed_queries": ["<string>"],
"k": 2,
"name": "<string>",
"tau": 1,
"time_range": {
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z",
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
datasets: ['<string>'],
seed_queries: ['<string>'],
k: 2,
name: '<string>',
tau: 1,
time_range: {
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z',
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.withsplendor.com/v1/views/cluster', 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.withsplendor.com/v1/views/cluster",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'datasets' => [
'<string>'
],
'seed_queries' => [
'<string>'
],
'k' => 2,
'name' => '<string>',
'tau' => 1,
'time_range' => [
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z',
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withsplendor.com/v1/views/cluster"
payload := strings.NewReader("{\n \"datasets\": [\n \"<string>\"\n ],\n \"seed_queries\": [\n \"<string>\"\n ],\n \"k\": 2,\n \"name\": \"<string>\",\n \"tau\": 1,\n \"time_range\": {\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\",\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withsplendor.com/v1/views/cluster")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"datasets\": [\n \"<string>\"\n ],\n \"seed_queries\": [\n \"<string>\"\n ],\n \"k\": 2,\n \"name\": \"<string>\",\n \"tau\": 1,\n \"time_range\": {\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\",\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/views/cluster")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"datasets\": [\n \"<string>\"\n ],\n \"seed_queries\": [\n \"<string>\"\n ],\n \"k\": 2,\n \"name\": \"<string>\",\n \"tau\": 1,\n \"time_range\": {\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\",\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-01-15T09:30:00Z",
"expires_at": "2026-01-15T09:30:00Z",
"from_search_id": "srch_8f2c",
"kind": "materialized",
"name": "Timeout errors",
"record_count": 1240,
"total": {
"relation": "eq",
"value": 1240
},
"view_id": "view_01H8Z3"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
API token issued from the Splendor console.
Headers
Selects the tenant (workspace) the request acts within.
Body
application/json
Freeze a semantic/hybrid cluster (all members with fused score >= tau, up to k) into a materialized view that SQL can aggregate exhaustively.
Minimum array length:
1One or more seed phrasings; their neighborhoods are unioned to widen recall.
Required array length:
1 - 16 elementsMax members; bounded by the server's cluster_view_max_members.
Required range:
x >= 1Required string length:
1 - 255Fused-score threshold; omit to auto-pick from the score-distribution knee.
Required range:
x >= 0Show child attributes
Show child attributes
Response
Successful Response
The response is of type object.
⌘I