Skip to main content
POST
Count activities

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
filter
object

Which activities to match. Every supplied field must match, and the values in one list match when any one does, except tags with tagsMatch all and properties, where every condition must match. An omitted or empty list leaves its field unfiltered, except employeeIds.

groupBy
enum<string>

Also count by group. type: one group per type externalId, largest count first, then by key. month: one group per UTC calendar month, keyed YYYY-MM, in ascending order; months with no activities are left out.

Available options:
type,
month

Response

The number of matching activities, and the groups when requested.

total
integer
required

The number of matching activities you can read.

Required range: x >= 0
Example:

42

groups
object[]

The counts by group. Present only when groupBy is set.