# Get Activity Level Report Retrieve activity level report data for a date range, paginated by day. Returns activity level percentage per user per day, with overall statistics across all users and days. Key Features: - Date range: Accepts start_date and end_date parameters (YYYY-MM-DD format). Maximum date range is 1 month (31 days). - Pagination: Results are paginated by day. Default is 30 days per page, maximum 100. - Filtering: Can filter by contract_id and user_ids. - Activity metrics: Activity level is calculated based on mouse, keyboard, and scroll actions. - Overall statistics: Includes aggregated activity data across all users and days in the report range. - Security: Only workspace owners and executive managers can access this endpoint. Endpoint: GET /reports/activity-level Version: 2.0.0 Security: oauth2, apiKey ## Query parameters: - `workspace_id` (integer, required) ID of the workspace Example: 1 - `start_date` (string, required) Start date of the report range. Format: YYYY-MM-DD (e.g., 2024-01-01). Must be before or equal to end_date. Example: "2024-01-01" - `end_date` (string, required) End date of the report range. Format: YYYY-MM-DD (e.g., 2024-01-31). Must be after or equal to start_date. Maximum date range is 1 month (31 days). Example: "2024-01-31" - `contract_id` (integer) Optional filter by contract ID (project-member assignment). If provided, only returns activity data for the specified contract. Example: 20 - `user_ids` (array) Optional filter by specific user IDs. Can be provided as comma-separated values (e.g., 100,101,102) or as an array. If not provided, returns all users. Example: [100,101,102] - `page` (integer) Page number for pagination. Results are paginated by user, so each page contains up to per_page users with all their daily activity data. Example: 1 - `per_page` (integer) Number of users per page. Each user includes all their daily activity data for the date range. Minimum: 1, Maximum: 100, Default: 30. Example: 30 ## Response 200 fields (application/json): - `success` (boolean) Example: true - `data` (object) - `data.report_type` (string, required) Type of the report Example: "activity_level" - `data.start_date` (string, required) Start date of the report range Example: "2024-01-01" - `data.end_date` (string, required) End date of the report range Example: "2024-01-31" - `data.total_users` (integer, required) Total number of users with activity data in the report range Example: 5 - `data.per_page` (integer, required) Number of users per page Example: 30 - `data.current_page` (integer, required) Current page number for user pagination Example: 1 - `data.total_pages` (integer, required) Total number of pages for user pagination Example: 1 - `data.users` (array, required) Array of users with their daily activity breakdown for the date range - `data.users.user_id` (integer, required) User ID Example: 100 - `data.users.member` (string,null) Full name of the user Example: "John Doe" - `data.users.total_mouse_actions` (integer, required) Total mouse actions for this user across all days in the date range Example: 1795 - `data.users.total_keyboard_actions` (integer, required) Total keyboard actions for this user across all days in the date range Example: 4820 - `data.users.total_scroll_actions` (integer, required) Total scroll actions for this user across all days in the date range Example: 318 - `data.users.total_minutes` (integer, required) Total tracked minutes for this user across all days in the date range Example: 930 - `data.users.activity_level` (integer, required) Overall activity level percentage (0-100) for this user across all days in the date range. Calculated as the average of daily activity percentages (rounded to nearest integer), matching dashboard behavior. Example: 84 - `data.users.daily_breakdown` (object, required) Daily breakdown of activity levels for this user. Keys are dates (YYYY-MM-DD format), values are objects containing activity data for that date. Example: {"2024-01-15":{"total_mouse_actions":945,"total_keyboard_actions":2520,"total_scroll_actions":168,"total_minutes":480,"activity_level":75.5},"2024-01-16":{"total_mouse_actions":850,"total_keyboard_actions":2300,"total_scroll_actions":150,"total_minutes":450,"activity_level":73.2}} - `data.contract_id` (integer,null) Contract ID filter that was applied (only included if contract_id parameter was provided in the request) Example: 20 - `message` (string) Example: "Activity level report retrieved successfully" - `meta` (object) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 400 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 401 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 403 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 500 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string)