Skip to main content
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": []
  }
}
'
{
  "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"
}

Authorizations

Authorization
string
header
required

API token issued from the Splendor console.

Headers

x-splendor-tenant-id
string
required

Selects the tenant (workspace) the request acts within.

Body

application/json
from_search_id
string | null
Minimum string length: 1
name
string | null
Required string length: 1 - 255
search_request
SearchRequest · object
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.