Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Update Saved Search

PUT/api/v2/saved-searches/{id}

Updates an existing saved search. This is a full replace: send the full object. Every optional field (select, where, whereLanguage, orderBy, tags, filters) is always written and falls back to its default when omitted, so omitting a field resets it rather than preserving the stored value.

Authorizations

  • AuthorizationBearer API Keyheaderrequired
    `Authorization: Bearer <token>`

Path parameters

  • idstringrequired

    Saved search ID

Request bodyJSON

  • namestringrequired

    Display name for the saved search.

    maxLength: 1024
    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.

    maxLength: 4096
    Example: "Timestamp, ServiceName, Body"
  • whereoptionalstring

    Row filter expression. The language is controlled by whereLanguage.

    maxLength: 8192
    Example: "SeverityText:ERROR"
  • whereLanguageoptionalluceneorsql

    Language used for the where filter.

    Default: "lucene" · Example: "lucene"
  • orderByoptionalstring

    ORDER BY expression. Empty uses the source default.

    maxLength: 1024
    Example: "Timestamp DESC"
  • tagsoptionalarray ofstring

    Tags used to organize saved searches.

    maxLength: 32
    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.

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

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

      Default: "sql" · Example: "sql"

Response

JSON

200

Successfully updated saved search

JSON
  • dataoptionalobject

    The saved search object.

    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.

      maxLength: 32
      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.

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

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

        Default: "sql" · 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