Saved Searches API

Manage saved search queries for quick access to frequently used log searches.

POST
/rest/v1/rpc/list_saved_searches
List all saved searches for the current tenant, including shared searches.

Authentication

Requires JWT token (Bearer token)

Parameters

NameTypeRequiredDescription
include_sharedbooleanOptionalInclude shared searches from other users (default: true)

Responses

200List of saved searches
[
  {
    "id": "uuid",
    "name": "API Errors",
    "description": "All errors from API service",
    "query_dsl": "level = 'error' AND service = 'api'",
    "category": "errors",
    "is_shared": true,
    "created_at": "2025-01-15T10:00:00Z",
    "updated_at": "2025-01-15T10:00:00Z",
    "last_run_at": "2025-01-15T12:00:00Z",
    "run_count": 5,
    "tags": ["api", "errors"],
    "created_by": "user-123"
  }
]
POST
/rest/v1/rpc/get_saved_search
Get a specific saved search by ID.

Authentication

Requires JWT token (Bearer token)

Parameters

NameTypeRequiredDescription
p_idstring (UUID)RequiredSaved search ID

Responses

200Saved search details
404Saved search not found
POST
/rest/v1/rpc/create_saved_search
Create a new saved search.

Authentication

Requires JWT token (Bearer token)

Parameters

NameTypeRequiredDescription
p_namestringRequiredSearch name
p_query_dslstringRequiredDSL query string
p_descriptionstringOptionalSearch description
p_categorystringOptionalCategory name
p_is_sharedbooleanOptionalWhether to share with other users (default: false)
p_tagsstring[]OptionalArray of tags

Request Body

interface CreateSavedSearchRequest {
  p_name: string
  p_query_dsl: string
  p_description?: string
  p_category?: string
  p_is_shared?: boolean
  p_tags?: string[]
}
Example
{
  "p_name": "API Errors",
  "p_query_dsl": "level = 'error' AND service = 'api'",
  "p_description": "All errors from API service",
  "p_category": "errors",
  "p_is_shared": true,
  "p_tags": ["api", "errors"]
}

Responses

200Created saved search ID
"uuid-of-created-search"
400Invalid input or plan limit exceeded
POST
/rest/v1/rpc/update_saved_search
Update an existing saved search.

Authentication

Requires JWT token (Bearer token)

Parameters

NameTypeRequiredDescription
p_idstring (UUID)RequiredSaved search ID
p_namestringOptionalSearch name
p_query_dslstringOptionalDSL query string
p_descriptionstringOptionalSearch description
p_categorystringOptionalCategory name
p_is_sharedbooleanOptionalWhether to share with other users
p_tagsstring[]OptionalArray of tags

Responses

200Updated saved search
404Saved search not found
POST
/rest/v1/rpc/delete_saved_search
Delete a saved search.

Authentication

Requires JWT token (Bearer token)

Parameters

NameTypeRequiredDescription
p_idstring (UUID)RequiredSaved search ID

Responses

200Successfully deleted
404Saved search not found
POST
/rest/v1/rpc/check_plan_feature
Check if the current plan supports saved searches feature.

Authentication

Requires JWT token (Bearer token)

Parameters

NameTypeRequiredDescription
p_featurestringRequiredFeature name (e.g., "saved_searches")

Responses

200Feature access information
{
  "enabled": true,
  "maxCount": 50,
  "currentCount": 12
}
POST
/rest/v1/rpc/get_saved_search_count
Get the current count of saved searches for the user.

Authentication

Requires JWT token (Bearer token)

Responses

200Count of saved searches
12
POST
/rest/v1/rpc/get_saved_search_categories
Get all unique categories from saved searches.

Authentication

Requires JWT token (Bearer token)

Responses

200Array of category names
["errors", "performance", "security"]