Skip to main content
POST
Add a filter to a canvas, on a field from filtera…

Authorizations

authorization
string
header
required

Path Parameters

projectId
string<uuid>
required

The project in the URL. The caller's project user is read from it.

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})$
workspaceId
string<uuid>
required

POST /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters Parameter

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})$
canvasId
string<uuid>
required

POST /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters Parameter

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})$

Body

application/json

POST /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters Request body

field
string
required

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
enum<string>
required

Filter type. Must suit the field's columnType: Select (string/date), Number (number), Date (date), Input (any). Toggle is not supported on canvases.

Available options:
Input,
Select,
Number,
Date,
Toggle
filterSubType
required

Operator, from the filterType's own list (e.g. 'Select Multi', 'Number Greater than', 'Date Range'). Null for Toggle.

Available options:
Input Equals,
Input Starts with,
Input Ends with,
Input Contains
apiKey
string

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.

Minimum string length: 1
organizationId
string

The ID of the organization. Required when using Supabase JWT authentication.

connectionId
string

The ID of the connection a guest has access to

displayName
string

Label shown on the filter pill. Defaults to the field's columnDisplayName, else the column name.

Minimum string length: 1
fieldKeys
string[]

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.

Minimum array length: 1
itemIds
string[]

Restrict the filter to these tiles. Each must be one of the field's targets. Defaults to every target.

Minimum array length: 1
selectedValue

Initial value. Omit to create the filter with no value (inactive).

sort_order
integer
default:0

Position of the filter in the filter bar.

Required range: -9007199254740991 <= x <= 9007199254740991
dataModelVersion
integer

Published data model version to resolve fields and run queries against. Defaults to the published version.

Required range: x <= 9007199254740991

Response

POST /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/filters Positive response

status
string
required
Allowed value: "success"
data
object
required