Skip to main content
PUT
Set stat view access

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

Complete replacement of recipient grants, up to 32 KiB of JSON. Omitted audiences reset to no access. The owner's write access is always preserved.

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

employeeAccess
Employee access · object[]

Direct employee grants, at most 250. Omitted or empty clears existing grants.

Maximum array length: 250
Example:
groupAccess
Group access · object[]

Group grants, at most 250. Omitted or empty clears existing grants.

Maximum array length: 250
Example:
subtreeAccess
Owner's reporting team access · object[]

At most one read grant for the owner's reporting team, rooted at the owner's employee ID. The owner must have a direct report. Omit to clear the team grant.

Maximum array length: 1
Example:
allManagersAccess
enum<string>
default:none

Read access for all managers. Defaults to none. Changing or removing this access requires permission to share analytics views workspace-wide.

Available options:
none,
read,
write
Example:

"none"

companyAccess
enum<string>
default:none

Read access for the whole workspace. Defaults to none. Changing or removing this access requires permission to share analytics views workspace-wide.

Available options:
none,
read,
write
Example:

"none"

automationAccess
Automation access · object[]

Unsupported audience. Omit or supply an empty array.

Example:
capabilitiesAccess
Capability access · object[]

Unsupported audience. Omit or supply an empty array.

Example:

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.