Skip to main content
PATCH
Update a stat view

Authorizations

Authorization
string
header
required

Use an API key or OAuth access token. Enter only the token in the authorization dialog; requests send it as Authorization: Bearer <TOKEN>.

Create an API key in your workspace's Settings → API keys. Keys start with wm_api_ and only work in the workspace where they were created. Read-only keys can read data; creating, updating, or deleting data requires a read-write key.

OAuth access tokens are issued for connected Windmill applications.

Both token types use the authenticated user's workspace permissions. Each endpoint's permission requirements and the sharing settings of the requested items still apply.

Path Parameters

companyId
string
required

Company ID. A URL slug is also accepted. The caller must have access to this company.

Required string length: 1 - 128
Example:

"company-acme"

id
string<uuid>
required

UUID of an active saved stat view in this workspace.

Example:

"22222222-2222-4222-8222-222222222222"

Body

application/json

Supply expectedVersion and at least one saved view field. Omitted fields are preserved. Supplied arrays and filters replace their previous values. Maximum JSON size is 32 KiB.

expectedVersion
integer
required

Version from the latest view response. A conflicting change returns 409; reload the view and retry with its current version.

Example:

1

name
string

Name of the saved view, from 1 to 120 characters after trimming whitespace.

Required string length: 1 - 120
Example:

"Engineering activity"

statMetadataIds
string<uuid>[]

Ordered selection of 1 to 50 unique stat definition UUIDs from POST /c/{companyId}/stats/metadata/search. Definitions must be global or belong to this workspace and must not be archived.

Required array length: 1 - 50 elements
Example:
employeeFilter
Saved employee filter · object

Replacement employee filter. Omit to preserve the saved selection. Supports at most 5 nesting levels, including the root, 50 filter objects, and 500 values per filter array.

Response

Updated stat view identity and version

view
Stat view · object
required

Saved view identity and current version. Fetch the view for its full configuration.