get_activity_counts
Count Nextcloud activities per day over a chosen period to reveal when events occurred and spot activity patterns.
Instructions
Count the current user's activities per day over the last days, e.g. to see when something happened.
Needs Nextcloud 35 (Activity 8). Days are the user's days in their Nextcloud time zone, ending today, while a date passed to get_activity's start and end is a UTC day; to list one of these days, pass start and end as times with the user's UTC offset (e.g. 2026-09-20T00:00:00+02:00 and 2026-09-20T23:59:59+02:00).
Args: activity_filter: Activity filter id (default: "all"); see list_activity_filters. days: Number of days ending today (1-366, default 30). search: Only count activities whose file path contains this text (2-255 characters). actor: Only count activities done by this user ID. object_type: Only count activities about this object; must be used together with object_id, and with activity_filter left at "all". object_id: The object's ID, e.g. a file ID for object_type "files".
Returns: JSON object with "from" and "to" (dates), "counts" (date to count, only days with activity), "total" and "max". "partial_before" is set when Nextcloud stopped counting at its row limit: counts for that date and earlier are missing, so a shorter window gives complete numbers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| actor | No | ||
| search | No | ||
| object_id | No | ||
| object_type | No | ||
| activity_filter | No | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |