v1

latestOpenAPI 3.0.02026-07-1738124256.1 KB
Saved Searches

Create Saved Search

Creates a new saved search.

post/api/v2/saved-searches

Request body

namestring required

Display name for the saved search.

sourceIdstring required

ID of the source to query. Must belong to the team.

selectstring

Comma-separated list of column expressions to display. Empty uses the source default.

wherestring

Row filter expression. The language is controlled by whereLanguage.

whereLanguage'lucene' | 'sql'

Language used for the where filter.

orderBystring

ORDER BY expression. Empty uses the source default.

tagsstring[]

Tags used to organize saved searches.

Example request

{
  "name": "Production Errors",
  "sourceId": "507f1f77bcf86cd799439012",
  "select": "Timestamp, ServiceName, Body",
  "where": "SeverityText:ERROR",
  "whereLanguage": "lucene",
  "orderBy": "Timestamp DESC",
  "tags": [
    "production",
    "errors"
  ],
  "filters": [
    {
      "type": "sql",
      "condition": "ServiceName IN ('checkout', 'payments')"
    }
  ]
}

Response

Successfully created saved search

Example response

{
  "data": {
    "id": "507f1f77bcf86cd799439011",
    "name": "Production Errors",
    "sourceId": "507f1f77bcf86cd799439012",
    "select": "Timestamp, ServiceName, Body",
    "where": "SeverityText:ERROR",
    "whereLanguage": "lucene",
    "orderBy": "Timestamp DESC",
    "tags": [
      "production",
      "errors"
    ],
    "filters": [
      {
        "type": "sql",
        "condition": "ServiceName IN ('checkout', 'payments')"
      }
    ],
    "teamId": "507f1f77bcf86cd799439013",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-06-15T10:30:00.000Z"
  }
}