Create a view
curl --request POST \
--url https://api.withsplendor.com/v1/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"from_search_id": "<string>",
"name": "<string>",
"search_request": {
"aggregations": [],
"collapse": null,
"content_filter": "text",
"cursor": null,
"dataset_scope": "selected",
"datasets": [
"app-logs"
],
"limit": 20,
"max_expansion_terms": 10,
"q": null,
"semantic": false,
"semantic_min_score": null,
"text": "timeout",
"time": null,
"where": []
}
}
'import requests
url = "https://api.withsplendor.com/v1/views"
payload = {
"from_search_id": "<string>",
"name": "<string>",
"search_request": {
"aggregations": [],
"collapse": None,
"content_filter": "text",
"cursor": None,
"dataset_scope": "selected",
"datasets": ["app-logs"],
"limit": 20,
"max_expansion_terms": 10,
"q": None,
"semantic": False,
"semantic_min_score": None,
"text": "timeout",
"time": None,
"where": []
}
}
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({
from_search_id: '<string>',
name: '<string>',
search_request: {
aggregations: [],
collapse: null,
content_filter: 'text',
cursor: null,
dataset_scope: 'selected',
datasets: ['app-logs'],
limit: 20,
max_expansion_terms: 10,
q: null,
semantic: false,
semantic_min_score: null,
text: 'timeout',
time: null,
where: []
}
})
};
fetch('https://api.withsplendor.com/v1/views', 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",
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([
'from_search_id' => '<string>',
'name' => '<string>',
'search_request' => [
'aggregations' => [
],
'collapse' => null,
'content_filter' => 'text',
'cursor' => null,
'dataset_scope' => 'selected',
'datasets' => [
'app-logs'
],
'limit' => 20,
'max_expansion_terms' => 10,
'q' => null,
'semantic' => false,
'semantic_min_score' => null,
'text' => 'timeout',
'time' => null,
'where' => [
]
]
]),
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"
payload := strings.NewReader("{\n \"from_search_id\": \"<string>\",\n \"name\": \"<string>\",\n \"search_request\": {\n \"aggregations\": [],\n \"collapse\": null,\n \"content_filter\": \"text\",\n \"cursor\": null,\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"app-logs\"\n ],\n \"limit\": 20,\n \"max_expansion_terms\": 10,\n \"q\": null,\n \"semantic\": false,\n \"semantic_min_score\": null,\n \"text\": \"timeout\",\n \"time\": null,\n \"where\": []\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")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_search_id\": \"<string>\",\n \"name\": \"<string>\",\n \"search_request\": {\n \"aggregations\": [],\n \"collapse\": null,\n \"content_filter\": \"text\",\n \"cursor\": null,\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"app-logs\"\n ],\n \"limit\": 20,\n \"max_expansion_terms\": 10,\n \"q\": null,\n \"semantic\": false,\n \"semantic_min_score\": null,\n \"text\": \"timeout\",\n \"time\": null,\n \"where\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/views")
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 \"from_search_id\": \"<string>\",\n \"name\": \"<string>\",\n \"search_request\": {\n \"aggregations\": [],\n \"collapse\": null,\n \"content_filter\": \"text\",\n \"cursor\": null,\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"app-logs\"\n ],\n \"limit\": 20,\n \"max_expansion_terms\": 10,\n \"q\": null,\n \"semantic\": false,\n \"semantic_min_score\": null,\n \"text\": \"timeout\",\n \"time\": null,\n \"where\": []\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": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Views
Create a view
Creates a view from exactly one source: an existing from_search_id handle or a full search_request. A view is either materialized (membership and rank frozen at creation) or live (the query re-runs on read). Use materialized views for deterministic, repeatable analysis.
POST
/
v1
/
views
Create a view
curl --request POST \
--url https://api.withsplendor.com/v1/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"from_search_id": "<string>",
"name": "<string>",
"search_request": {
"aggregations": [],
"collapse": null,
"content_filter": "text",
"cursor": null,
"dataset_scope": "selected",
"datasets": [
"app-logs"
],
"limit": 20,
"max_expansion_terms": 10,
"q": null,
"semantic": false,
"semantic_min_score": null,
"text": "timeout",
"time": null,
"where": []
}
}
'import requests
url = "https://api.withsplendor.com/v1/views"
payload = {
"from_search_id": "<string>",
"name": "<string>",
"search_request": {
"aggregations": [],
"collapse": None,
"content_filter": "text",
"cursor": None,
"dataset_scope": "selected",
"datasets": ["app-logs"],
"limit": 20,
"max_expansion_terms": 10,
"q": None,
"semantic": False,
"semantic_min_score": None,
"text": "timeout",
"time": None,
"where": []
}
}
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({
from_search_id: '<string>',
name: '<string>',
search_request: {
aggregations: [],
collapse: null,
content_filter: 'text',
cursor: null,
dataset_scope: 'selected',
datasets: ['app-logs'],
limit: 20,
max_expansion_terms: 10,
q: null,
semantic: false,
semantic_min_score: null,
text: 'timeout',
time: null,
where: []
}
})
};
fetch('https://api.withsplendor.com/v1/views', 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",
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([
'from_search_id' => '<string>',
'name' => '<string>',
'search_request' => [
'aggregations' => [
],
'collapse' => null,
'content_filter' => 'text',
'cursor' => null,
'dataset_scope' => 'selected',
'datasets' => [
'app-logs'
],
'limit' => 20,
'max_expansion_terms' => 10,
'q' => null,
'semantic' => false,
'semantic_min_score' => null,
'text' => 'timeout',
'time' => null,
'where' => [
]
]
]),
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"
payload := strings.NewReader("{\n \"from_search_id\": \"<string>\",\n \"name\": \"<string>\",\n \"search_request\": {\n \"aggregations\": [],\n \"collapse\": null,\n \"content_filter\": \"text\",\n \"cursor\": null,\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"app-logs\"\n ],\n \"limit\": 20,\n \"max_expansion_terms\": 10,\n \"q\": null,\n \"semantic\": false,\n \"semantic_min_score\": null,\n \"text\": \"timeout\",\n \"time\": null,\n \"where\": []\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")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_search_id\": \"<string>\",\n \"name\": \"<string>\",\n \"search_request\": {\n \"aggregations\": [],\n \"collapse\": null,\n \"content_filter\": \"text\",\n \"cursor\": null,\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"app-logs\"\n ],\n \"limit\": 20,\n \"max_expansion_terms\": 10,\n \"q\": null,\n \"semantic\": false,\n \"semantic_min_score\": null,\n \"text\": \"timeout\",\n \"time\": null,\n \"where\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/views")
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 \"from_search_id\": \"<string>\",\n \"name\": \"<string>\",\n \"search_request\": {\n \"aggregations\": [],\n \"collapse\": null,\n \"content_filter\": \"text\",\n \"cursor\": null,\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"app-logs\"\n ],\n \"limit\": 20,\n \"max_expansion_terms\": 10,\n \"q\": null,\n \"semantic\": false,\n \"semantic_min_score\": null,\n \"text\": \"timeout\",\n \"time\": null,\n \"where\": []\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": "<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
Minimum string length:
1Required string length:
1 - 255Show child attributes
Show child attributes
Example:
{
"aggregations": [],
"collapse": null,
"content_filter": "text",
"cursor": null,
"dataset_scope": "selected",
"datasets": ["app-logs"],
"limit": 20,
"max_expansion_terms": 10,
"q": null,
"semantic": false,
"semantic_min_score": null,
"text": "timeout",
"time": null,
"where": []
}
Response
Successful Response
The response is of type object.
⌘I