> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsolve.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Canvas Filter

> Update a canvas filter's value, operator, label or field



## OpenAPI

````yaml patch /v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/filters/{filterId}
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/filters/{filterId}:
    patch:
      summary: Update a canvas filter's value, operator, label o…
      description: Update a canvas filter's value, operator, label or field
      operationId: >-
        PatchV2ApiProjectsProjectIdWorkspacesWorkspaceIdCanvasesCanvasIdFiltersFilterId
      parameters:
        - name: projectId
          in: path
          required: true
          description: The project in the URL. The caller's project user is read from it.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The project in the URL. The caller's project user is read from it.
        - name: workspaceId
          in: path
          required: true
          description: >-
            PATCH
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters/:filterId
            Parameter
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
        - name: canvasId
          in: path
          required: true
          description: >-
            PATCH
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters/:filterId
            Parameter
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
        - name: filterId
          in: path
          required: true
          description: >-
            PATCH
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters/:filterId
            Parameter
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
      requestBody:
        description: >-
          PATCH
          /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters/:filterId
          Request body
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKey:
                  description: >-
                    Upsolve API key, generated under Account → Developer
                    settings in the Upsolve Hub. Keys are user-scoped: pass
                    organizationId alongside the key to select which org to act
                    on.
                  type: string
                  minLength: 1
                organizationId:
                  type: string
                  description: >-
                    The ID of the organization. Required when using Supabase JWT
                    authentication.
                connectionId:
                  type: string
                  description: The ID of the connection a guest has access to
                field:
                  type: string
                  description: >-
                    The `fieldKey` of a field from GET …/filterable-fields — a
                    column's, or a custom filter's (`custom:<id>`). The server
                    resolves it into per-tile targets.
                filterType:
                  type: string
                  enum:
                    - Input
                    - Select
                    - Number
                    - Date
                    - Toggle
                  description: >-
                    Filter type. Must suit the field's columnType: Select
                    (string/date), Number (number), Date (date), Input (any).
                    Toggle is not supported on canvases.
                filterSubType:
                  anyOf:
                    - type: string
                      enum:
                        - Input Equals
                        - Input Starts with
                        - Input Ends with
                        - Input Contains
                    - type: string
                      enum:
                        - Select Single
                        - Select Multi
                    - type: string
                      enum:
                        - Number Greater than
                        - Number Greater than or equal to
                        - Number Less than
                        - Number Less than or equal to
                        - Number Equal to
                    - type: string
                      enum:
                        - Date Single
                        - Date Range
                        - Date Range (No Timestamp)
                        - Date After
                        - Date Before
                    - type: 'null'
                  description: >-
                    Operator, from the filterType's own list (e.g. 'Select
                    Multi', 'Number Greater than', 'Date Range'). Null for
                    Toggle.
                displayName:
                  description: >-
                    Label shown on the filter pill. Defaults to the field's
                    columnDisplayName, else the column name.
                  type: string
                  minLength: 1
                fieldKeys:
                  description: >-
                    Tables picked under one column name, each a
                    `raw:<table>.<column>` key from a field's tableChoices, all
                    of one type: each chart is filtered on every one of these
                    tables it reads, or not at all, and a chart that reads none
                    of them is not filtered (even one showing a column of the
                    name). `field` must be the first of them.
                  minItems: 1
                  type: array
                  items:
                    type: string
                itemIds:
                  description: >-
                    Restrict the filter to these tiles. Each must be one of the
                    field's targets. Defaults to every target.
                  minItems: 1
                  type: array
                  items:
                    type: string
                selectedValue:
                  description: >-
                    Initial value. Omit to create the filter with no value
                    (inactive).
                  anyOf:
                    - anyOf:
                        - type: string
                        - type: number
                        - {}
                        - type: boolean
                        - type: 'null'
                    - type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - {}
                          - type: boolean
                          - type: 'null'
                      description: >-
                        An array is used when multiple values are selected, as
                        with the date range filter, or with a multi-select
                        filter.
                sort_order:
                  description: Position of the filter in the filter bar.
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                dataModelVersion:
                  description: >-
                    Published data model version to resolve fields and run
                    queries against. Defaults to the published version.
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
              required: []
      responses:
        '200':
          description: >-
            PATCH
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters/:filterId
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      filter:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                          canvas_id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                          filter_config:
                            allOf:
                              - oneOf:
                                  - type: object
                                    properties:
                                      filterType:
                                        type: string
                                        const: Input
                                      filterSubType:
                                        type: string
                                        enum:
                                          - Input Equals
                                          - Input Starts with
                                          - Input Ends with
                                          - Input Contains
                                        description: Subtype of the input filter.
                                      filterRestrictions:
                                        type: 'null'
                                        description: >-
                                          No specific restrictions for the input
                                          filter.
                                      displayName:
                                        type: string
                                        description: User-driven display name for the filter.
                                      controlKey:
                                        description: >-
                                          User-driven key to identify the filter
                                          when controlled externally.
                                        type: string
                                      layout:
                                        type: object
                                        properties:
                                          i:
                                            type: string
                                            description: >-
                                              Component key or uses the index of
                                              components if not provided.
                                          x:
                                            type: number
                                            description: X position in grid units.
                                          'y':
                                            type: number
                                            description: Y position in grid units.
                                          w:
                                            type: number
                                            description: Width in grid units.
                                          h:
                                            type: number
                                            description: Height in grid units.
                                          minW:
                                            description: Minimum width in grid units.
                                            type: number
                                          maxW:
                                            description: Maximum width in grid units.
                                            type: number
                                          minH:
                                            description: Minimum height in grid units.
                                            type: number
                                          maxH:
                                            description: Maximum height in grid units.
                                            type: number
                                          moved:
                                            description: Set by DragEvents and ResizeEvents.
                                            type: boolean
                                          static:
                                            description: >-
                                              If true, equal to `isDraggable: false`
                                              and `isResizable: false`.
                                            type: boolean
                                          isDraggable:
                                            description: >-
                                              If false, will not be draggable.
                                              Overrides `static`.
                                            type: boolean
                                          isResizable:
                                            description: >-
                                              If false, will not be resizable.
                                              Overrides `static`.
                                            type: boolean
                                          resizeHandles:
                                            description: Array of resize handles.
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - s
                                                - w
                                                - e
                                                - 'n'
                                                - sw
                                                - nw
                                                - se
                                                - ne
                                          isBounded:
                                            description: >-
                                              If true and draggable, item will be
                                              moved only within the grid.
                                            type: boolean
                                        required:
                                          - i
                                          - x
                                          - 'y'
                                          - w
                                          - h
                                        additionalProperties: false
                                        description: >-
                                          User-driven layout configuration for the
                                          filter.
                                    required:
                                      - filterType
                                      - filterSubType
                                      - filterRestrictions
                                      - displayName
                                      - layout
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      filterType:
                                        type: string
                                        const: Select
                                      filterSubType:
                                        type: string
                                        enum:
                                          - Select Single
                                          - Select Multi
                                        description: Subtype of the select filter.
                                      filterRestrictions:
                                        description: Allowed values for the select filter.
                                        type:
                                          - object
                                          - 'null'
                                        properties:
                                          values:
                                            type: array
                                            items:
                                              type: string
                                            description: An array of allowed string values.
                                        required:
                                          - values
                                        additionalProperties: false
                                      filterRestrictionMethod:
                                        description: >-
                                          Method to compute the restrictions for
                                          this Select filter. Defaults to
                                          {filterType: 'Scan'} to scan the column
                                          it is pointing at
                                        oneOf:
                                          - type: object
                                            properties:
                                              filterType:
                                                type: string
                                                const: Manual
                                              options:
                                                type: array
                                                items:
                                                  type: string
                                                description: >-
                                                  User provided options for this select
                                                  filter
                                            required:
                                              - filterType
                                              - options
                                            additionalProperties: false
                                          - type: object
                                            properties:
                                              filterType:
                                                type: string
                                                const: Query
                                              query:
                                                type: string
                                                description: >-
                                                  Query to run to populate this select
                                                  filter
                                            required:
                                              - filterType
                                              - query
                                            additionalProperties: false
                                          - type: object
                                            properties:
                                              filterType:
                                                type: string
                                                const: Scan
                                            required:
                                              - filterType
                                            additionalProperties: false
                                        discriminator:
                                          propertyName: filterType
                                      defaultValue:
                                        description: The default value for the filter.
                                        type: string
                                      displayName:
                                        type: string
                                        description: User-driven display name for the filter.
                                      controlKey:
                                        description: >-
                                          User-driven key to identify the filter
                                          when controlled externally.
                                        type: string
                                      layout:
                                        type: object
                                        properties:
                                          i:
                                            type: string
                                            description: >-
                                              Component key or uses the index of
                                              components if not provided.
                                          x:
                                            type: number
                                            description: X position in grid units.
                                          'y':
                                            type: number
                                            description: Y position in grid units.
                                          w:
                                            type: number
                                            description: Width in grid units.
                                          h:
                                            type: number
                                            description: Height in grid units.
                                          minW:
                                            description: Minimum width in grid units.
                                            type: number
                                          maxW:
                                            description: Maximum width in grid units.
                                            type: number
                                          minH:
                                            description: Minimum height in grid units.
                                            type: number
                                          maxH:
                                            description: Maximum height in grid units.
                                            type: number
                                          moved:
                                            description: Set by DragEvents and ResizeEvents.
                                            type: boolean
                                          static:
                                            description: >-
                                              If true, equal to `isDraggable: false`
                                              and `isResizable: false`.
                                            type: boolean
                                          isDraggable:
                                            description: >-
                                              If false, will not be draggable.
                                              Overrides `static`.
                                            type: boolean
                                          isResizable:
                                            description: >-
                                              If false, will not be resizable.
                                              Overrides `static`.
                                            type: boolean
                                          resizeHandles:
                                            description: Array of resize handles.
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - s
                                                - w
                                                - e
                                                - 'n'
                                                - sw
                                                - nw
                                                - se
                                                - ne
                                          isBounded:
                                            description: >-
                                              If true and draggable, item will be
                                              moved only within the grid.
                                            type: boolean
                                        required:
                                          - i
                                          - x
                                          - 'y'
                                          - w
                                          - h
                                        additionalProperties: false
                                        description: >-
                                          User-driven layout configuration for the
                                          filter.
                                    required:
                                      - filterType
                                      - filterSubType
                                      - displayName
                                      - layout
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      filterType:
                                        type: string
                                        const: Number
                                      filterSubType:
                                        type: string
                                        enum:
                                          - Number Greater than
                                          - Number Greater than or equal to
                                          - Number Less than
                                          - Number Less than or equal to
                                          - Number Equal to
                                        description: Subtype of the number filter.
                                      filterRestrictions:
                                        description: >-
                                          Allowed numeric range for the number
                                          filter.
                                        type:
                                          - object
                                          - 'null'
                                        properties:
                                          min:
                                            type: number
                                            description: The minimum allowed number.
                                          max:
                                            type: number
                                            description: The maximum allowed number.
                                        required:
                                          - min
                                          - max
                                        additionalProperties: false
                                      displayName:
                                        type: string
                                        description: User-driven display name for the filter.
                                      controlKey:
                                        description: >-
                                          User-driven key to identify the filter
                                          when controlled externally.
                                        type: string
                                      layout:
                                        type: object
                                        properties:
                                          i:
                                            type: string
                                            description: >-
                                              Component key or uses the index of
                                              components if not provided.
                                          x:
                                            type: number
                                            description: X position in grid units.
                                          'y':
                                            type: number
                                            description: Y position in grid units.
                                          w:
                                            type: number
                                            description: Width in grid units.
                                          h:
                                            type: number
                                            description: Height in grid units.
                                          minW:
                                            description: Minimum width in grid units.
                                            type: number
                                          maxW:
                                            description: Maximum width in grid units.
                                            type: number
                                          minH:
                                            description: Minimum height in grid units.
                                            type: number
                                          maxH:
                                            description: Maximum height in grid units.
                                            type: number
                                          moved:
                                            description: Set by DragEvents and ResizeEvents.
                                            type: boolean
                                          static:
                                            description: >-
                                              If true, equal to `isDraggable: false`
                                              and `isResizable: false`.
                                            type: boolean
                                          isDraggable:
                                            description: >-
                                              If false, will not be draggable.
                                              Overrides `static`.
                                            type: boolean
                                          isResizable:
                                            description: >-
                                              If false, will not be resizable.
                                              Overrides `static`.
                                            type: boolean
                                          resizeHandles:
                                            description: Array of resize handles.
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - s
                                                - w
                                                - e
                                                - 'n'
                                                - sw
                                                - nw
                                                - se
                                                - ne
                                          isBounded:
                                            description: >-
                                              If true and draggable, item will be
                                              moved only within the grid.
                                            type: boolean
                                        required:
                                          - i
                                          - x
                                          - 'y'
                                          - w
                                          - h
                                        additionalProperties: false
                                        description: >-
                                          User-driven layout configuration for the
                                          filter.
                                    required:
                                      - filterType
                                      - filterSubType
                                      - displayName
                                      - layout
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      filterType:
                                        type: string
                                        const: Date
                                      filterSubType:
                                        type: string
                                        enum:
                                          - Date Single
                                          - Date Range
                                          - Date Range (No Timestamp)
                                          - Date After
                                          - Date Before
                                        description: Subtype of the date filter.
                                      filterRestrictions:
                                        description: Allowed date range for the date filter.
                                        type:
                                          - object
                                          - 'null'
                                        properties:
                                          min:
                                            type: string
                                            description: The minimum allowed date.
                                          max:
                                            type: string
                                            description: The maximum allowed date.
                                        required:
                                          - min
                                          - max
                                        additionalProperties: false
                                      displayName:
                                        type: string
                                        description: User-driven display name for the filter.
                                      controlKey:
                                        description: >-
                                          User-driven key to identify the filter
                                          when controlled externally.
                                        type: string
                                      layout:
                                        type: object
                                        properties:
                                          i:
                                            type: string
                                            description: >-
                                              Component key or uses the index of
                                              components if not provided.
                                          x:
                                            type: number
                                            description: X position in grid units.
                                          'y':
                                            type: number
                                            description: Y position in grid units.
                                          w:
                                            type: number
                                            description: Width in grid units.
                                          h:
                                            type: number
                                            description: Height in grid units.
                                          minW:
                                            description: Minimum width in grid units.
                                            type: number
                                          maxW:
                                            description: Maximum width in grid units.
                                            type: number
                                          minH:
                                            description: Minimum height in grid units.
                                            type: number
                                          maxH:
                                            description: Maximum height in grid units.
                                            type: number
                                          moved:
                                            description: Set by DragEvents and ResizeEvents.
                                            type: boolean
                                          static:
                                            description: >-
                                              If true, equal to `isDraggable: false`
                                              and `isResizable: false`.
                                            type: boolean
                                          isDraggable:
                                            description: >-
                                              If false, will not be draggable.
                                              Overrides `static`.
                                            type: boolean
                                          isResizable:
                                            description: >-
                                              If false, will not be resizable.
                                              Overrides `static`.
                                            type: boolean
                                          resizeHandles:
                                            description: Array of resize handles.
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - s
                                                - w
                                                - e
                                                - 'n'
                                                - sw
                                                - nw
                                                - se
                                                - ne
                                          isBounded:
                                            description: >-
                                              If true and draggable, item will be
                                              moved only within the grid.
                                            type: boolean
                                        required:
                                          - i
                                          - x
                                          - 'y'
                                          - w
                                          - h
                                        additionalProperties: false
                                        description: >-
                                          User-driven layout configuration for the
                                          filter.
                                    required:
                                      - filterType
                                      - filterSubType
                                      - displayName
                                      - layout
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      filterType:
                                        type: string
                                        const: Toggle
                                      filterSubType:
                                        type: 'null'
                                        description: >-
                                          No specific subtype for the toggle
                                          filter.
                                      filterRestrictions:
                                        type: 'null'
                                        description: >-
                                          No specific restrictions for the toggle
                                          filter.
                                      displayName:
                                        type: string
                                        description: User-driven display name for the filter.
                                      controlKey:
                                        description: >-
                                          User-driven key to identify the filter
                                          when controlled externally.
                                        type: string
                                      layout:
                                        type: object
                                        properties:
                                          i:
                                            type: string
                                            description: >-
                                              Component key or uses the index of
                                              components if not provided.
                                          x:
                                            type: number
                                            description: X position in grid units.
                                          'y':
                                            type: number
                                            description: Y position in grid units.
                                          w:
                                            type: number
                                            description: Width in grid units.
                                          h:
                                            type: number
                                            description: Height in grid units.
                                          minW:
                                            description: Minimum width in grid units.
                                            type: number
                                          maxW:
                                            description: Maximum width in grid units.
                                            type: number
                                          minH:
                                            description: Minimum height in grid units.
                                            type: number
                                          maxH:
                                            description: Maximum height in grid units.
                                            type: number
                                          moved:
                                            description: Set by DragEvents and ResizeEvents.
                                            type: boolean
                                          static:
                                            description: >-
                                              If true, equal to `isDraggable: false`
                                              and `isResizable: false`.
                                            type: boolean
                                          isDraggable:
                                            description: >-
                                              If false, will not be draggable.
                                              Overrides `static`.
                                            type: boolean
                                          isResizable:
                                            description: >-
                                              If false, will not be resizable.
                                              Overrides `static`.
                                            type: boolean
                                          resizeHandles:
                                            description: Array of resize handles.
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - s
                                                - w
                                                - e
                                                - 'n'
                                                - sw
                                                - nw
                                                - se
                                                - ne
                                          isBounded:
                                            description: >-
                                              If true and draggable, item will be
                                              moved only within the grid.
                                            type: boolean
                                        required:
                                          - i
                                          - x
                                          - 'y'
                                          - w
                                          - h
                                        additionalProperties: false
                                        description: >-
                                          User-driven layout configuration for the
                                          filter.
                                    required:
                                      - filterType
                                      - filterSubType
                                      - filterRestrictions
                                      - displayName
                                      - layout
                                    additionalProperties: false
                                discriminator:
                                  propertyName: filterType
                              - type: object
                                properties:
                                  globalFilterColumns:
                                    description: Array of targeted filter configurations.
                                    type: array
                                    items:
                                      type: string
                                      description: Global column name to filter on
                                  filterTargets:
                                    type: array
                                    items:
                                      allOf:
                                        - oneOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  const: Before logic
                                                columns:
                                                  type: array
                                                  items:
                                                    type: object
                                                    properties:
                                                      type:
                                                        type: string
                                                        enum:
                                                          - string
                                                          - number
                                                          - boolean
                                                          - date
                                                          - mixed
                                                          - json
                                                        description: The data type of the column.
                                                      columnName:
                                                        type: string
                                                        description: The name of the column.
                                                      columnMetadata:
                                                        description: >-
                                                          The description of the column used for
                                                          AI.
                                                        type: string
                                                      columnSummary:
                                                        description: >-
                                                          An object that summarizes the data in
                                                          the column. Is only ever provided if
                                                          dataIsVisibleToAi is set to true.
                                                        type: object
                                                        properties:
                                                          values:
                                                            type: array
                                                            items: {}
                                                            description: >-
                                                              An array of example values summarizing
                                                              the contents of the column
                                                          isExhaustive:
                                                            type: boolean
                                                            description: >-
                                                              This is set to true if the values array
                                                              is an exhaustive summary of the
                                                              available values in the column. If it's
                                                              set to false it represents just some
                                                              examples.
                                                        required:
                                                          - values
                                                          - isExhaustive
                                                        additionalProperties: false
                                                    required:
                                                      - type
                                                      - columnName
                                                    additionalProperties: false
                                                  description: >-
                                                    List of simple columns for 'Before
                                                    logic'.
                                                targetTable:
                                                  description: Name of the target table.
                                                  type: string
                                                chartId:
                                                  type: string
                                                  description: Identifier of the target chart.
                                              required:
                                                - type
                                                - columns
                                                - chartId
                                              additionalProperties: false
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  const: After logic
                                                columns:
                                                  type: array
                                                  items:
                                                    type: object
                                                    properties:
                                                      type:
                                                        type: string
                                                        enum:
                                                          - string
                                                          - number
                                                          - boolean
                                                          - date
                                                          - mixed
                                                          - json
                                                        description: The data type of the column.
                                                      columnName:
                                                        type: string
                                                        description: The name of the column.
                                                      columnMetadata:
                                                        description: >-
                                                          The description of the column used for
                                                          AI.
                                                        type: string
                                                      columnSummary:
                                                        description: >-
                                                          An object that summarizes the data in
                                                          the column. Is only ever provided if
                                                          dataIsVisibleToAi is set to true.
                                                        type: object
                                                        properties:
                                                          values:
                                                            type: array
                                                            items: {}
                                                            description: >-
                                                              An array of example values summarizing
                                                              the contents of the column
                                                          isExhaustive:
                                                            type: boolean
                                                            description: >-
                                                              This is set to true if the values array
                                                              is an exhaustive summary of the
                                                              available values in the column. If it's
                                                              set to false it represents just some
                                                              examples.
                                                        required:
                                                          - values
                                                          - isExhaustive
                                                        additionalProperties: false
                                                    required:
                                                      - type
                                                      - columnName
                                                    additionalProperties: false
                                                  description: >-
                                                    List of simple columns for 'After
                                                    logic'.
                                                targetTable:
                                                  type: 'null'
                                                  description: >-
                                                    No target table needed for filters after
                                                    logic.
                                                chartId:
                                                  type: string
                                                  description: Identifier of the target chart.
                                              required:
                                                - type
                                                - columns
                                                - targetTable
                                                - chartId
                                              additionalProperties: false
                                          discriminator:
                                            propertyName: type
                                        - type: object
                                          properties:
                                            targetColumn:
                                              description: >-
                                                User-driven target column for the
                                                filter.
                                              type: string
                                          additionalProperties: false
                                    description: Array of targeted filter configurations.
                                  selectedValue:
                                    anyOf:
                                      - anyOf:
                                          - type: string
                                          - type: number
                                          - {}
                                          - type: boolean
                                          - type: 'null'
                                      - type: array
                                        items:
                                          anyOf:
                                            - type: string
                                            - type: number
                                            - {}
                                            - type: boolean
                                            - type: 'null'
                                        description: >-
                                          An array is used when multiple values
                                          are selected, as with the date range
                                          filter, or with a multi-select filter.
                                required:
                                  - filterTargets
                                additionalProperties: false
                              - type: object
                                properties:
                                  fieldKey:
                                    description: >-
                                      The catalog field this filter was created
                                      from.
                                    type: string
                                  fieldRef:
                                    description: >-
                                      On a filter whose fieldKey is not a `col:`
                                      key: the one table column ('raw') or tile
                                      result column ('output') it filters.
                                      Ignore it on a `col:` key.
                                    type: object
                                    properties:
                                      kind:
                                        type: string
                                        enum:
                                          - raw
                                          - output
                                      table:
                                        type:
                                          - string
                                          - 'null'
                                      column:
                                        type: string
                                      columnType:
                                        type: string
                                        enum:
                                          - string
                                          - number
                                          - date
                                          - boolean
                                        description: >-
                                          The column's data type, which decides
                                          the filter types it accepts.
                                    required:
                                      - kind
                                      - table
                                      - column
                                    additionalProperties: false
                                  itemIds:
                                    description: >-
                                      Tiles the filter is restricted to, when it
                                      was restricted.
                                    type: array
                                    items:
                                      type: string
                                  fieldKeys:
                                    description: >-
                                      On a filter made from a custom filter: its
                                      columns, in order. Each tile filters on
                                      the first that applies there. With
                                      filtersEveryTable, tables picked under one
                                      name, each tile filtered on every one it
                                      reads.
                                    type: array
                                    items:
                                      type: string
                                  tileColumns:
                                    description: >-
                                      On a filter made from a custom filter: the
                                      tiles given columns of their own, each
                                      filtered on every one of them.
                                    type: object
                                    propertyNames:
                                      type: string
                                    additionalProperties:
                                      type: array
                                      items:
                                        type: string
                                  customFilterId:
                                    description: >-
                                      The custom filter this filter was made
                                      from. Its columns, tiles and name follow
                                      that custom filter.
                                    type: string
                                  filtersEveryTable:
                                    description: >-
                                      True on a filter over tables picked under
                                      one column name (`fieldKeys`): each tile
                                      is filtered on every one of them it reads,
                                      or not at all.
                                    type: boolean
                                additionalProperties: false
                            description: >-
                              The filter: its type, operator, value, the field
                              it targets and its compiled per-tile targets.
                          sort_order:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          created_at: {}
                          updated_at: {}
                        required:
                          - id
                          - canvas_id
                          - filter_config
                          - sort_order
                          - created_at
                          - updated_at
                        additionalProperties: false
                    required:
                      - filter
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            PATCH
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters/:filterId
            Negative response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_3: []
components:
  securitySchemes:
    APIKEY_3:
      type: apiKey
      in: header
      name: authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.