Skip to main content
POST
Export employee stats as CSV

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"

Body

application/json

Date range, stat selection, and employee filter for series or CSV output.

dateRange
object
required
timezone
string

IANA timezone used to resolve the date range (e.g. "America/New_York"). Defaults to UTC.

Example:

"America/New_York"

statMetadataIds
string<uuid>[]

Stat definition UUIDs to load. An omitted or empty array adds no ID restriction. When statTypes is also supplied, definitions must match both selections. Unknown IDs match no data.

Example:
statTypes
string[]

Stat identifiers to load, global or workspace custom. Omit to add no identifier restriction. When statMetadataIds is also supplied, definitions must match both selections. Unknown identifiers match no data.

Minimum array length: 1
Example:
employee
Employee filter · object

Limits which employees are loaded within the set the caller can access. This filter never grants access to more employees.

Example:
periodLength
enum<string> | null

Aggregation period for the data points. Null aggregates the entire date range into one bucket; omit to derive a period from the date range.

Available options:
day,
week,
month,
year,
null
Example:

"week"

include
Additional response details · object

Optional parts of the JSON response. Does not affect CSV exports.

Example:

Response

CSV containing the selected stat series.

CSV file with one row per employee, stat, and period. Periods without a stored value for an employee are exported as 0.