Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

ClickStack: Create Saved Search

Beta
POST/v1/organizations/{organizationId}/services/{serviceId}/clickstack/saved-searches

This endpoint is in beta. API contract is stable, and no breaking changes are expected in the future.

ClickStack: Creates a new saved search.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the organization that owns the service.

    format: uuid
  • serviceIdstringrequired

    ID of the ClickStack service.

    format: uuid

Request bodyJSON

  • namestringrequired

    Display name for the saved search.

    Example: "Production Errors"
  • sourceIdstringrequired

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

    Example: "507f1f77bcf86cd799439012"
  • selectoptionalstring

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

    Example: "Timestamp, ServiceName, Body"
  • whereoptionalstring

    Row filter expression. The language is controlled by whereLanguage.

    Example: "SeverityText:ERROR"
  • whereLanguageoptionalluceneorsql

    Language used for the where filter.

    Example: "lucene"
  • orderByoptionalstring

    ORDER BY expression. Empty uses the source default.

    Example: "Timestamp DESC"
  • tagsoptionalarray ofstring

    Tags used to organize saved searches.

    Example: ["production","errors"]
  • filtersoptionalarray ofobject

    Structured pinned filters applied to the search.

    Example: ["{\"type\":\"sql\",\"condition\":\"ServiceName IN ('checkout', 'payments')\"}"]
    2 properties
    • conditionstringrequired

      SQL predicate applied to the search, in <column> IN (...) form.

      Example: "ServiceName IN ('checkout', 'payments')"
    • typeoptionalsql

      Always sql. Only SQL predicate filters render in the sidebar.

      Example: "sql"

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalobject
    12 properties
    • idstringrequired

      Unique saved search ID. Server-generated.

      Example: "507f1f77bcf86cd799439011"
    • namestringrequired

      Display name for the saved search.

      Example: "Production Errors"
    • sourceIdstringrequired

      ID of the source this saved search queries.

      Example: "507f1f77bcf86cd799439012"
    • selectoptionalstring

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

      Example: "Timestamp, ServiceName, Body"
    • whereoptionalstring

      Row filter expression. The language is controlled by whereLanguage.

      Example: "SeverityText:ERROR"
    • whereLanguageoptionalluceneorsql

      Language used for the where filter.

      Example: "lucene"
    • orderByoptionalstring

      ORDER BY expression. Empty uses the source default.

      Example: "Timestamp DESC"
    • tagsoptionalarray ofstring

      Tags used to organize saved searches.

      Example: ["production","errors"]
    • filtersoptionalarray ofobject

      Structured pinned filters applied to the search.

      Example: ["{\"type\":\"sql\",\"condition\":\"ServiceName IN ('checkout', 'payments')\"}"]
      2 properties
      • conditionstringrequired

        SQL predicate applied to the search, in <column> IN (...) form.

        Example: "ServiceName IN ('checkout', 'payments')"
      • typeoptionalsql

        Always sql. Only SQL predicate filters render in the sidebar.

        Example: "sql"
    • teamIdoptionalstring

      ID of the team that owns the saved search.

      Example: "507f1f77bcf86cd799439013"
    • createdAtoptionalstring

      Creation timestamp.

      format: date-time
      Example: "2025-01-01T00:00:00.000Z"
    • updatedAtoptionalstring

      Last update timestamp.

      format: date-time
      Example: "2025-06-15T10:30:00.000Z"
Navigation