Skip to content

Commit cc52909

Browse files
committed
doc/rest-api: add reporting section
1 parent cca90ed commit cc52909

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

doc/61-REST_API.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,3 +682,49 @@ GET https://monitoring.example.com/icingaweb2/eventtracker/history/actions
682682
Authorization: Bearer 108600bf-4f77-4bdc-9a06-4cd04902537c4
683683
Accept: application/json
684684
```
685+
686+
## Reporting
687+
688+
It is possible to fetch aggregated data for reporting purposes.
689+
690+
### Fetch Report: History Summary
691+
692+
```http
693+
GET https://monitoring.example.com/icingaweb2/eventtracker/reporting/history-summary?start=2025-11-10&end=2025-11-12&aggregation=daily
694+
Authorization: Bearer 108600bf-4f77-4bdc-9a06-4cd04902537c4
695+
Accept: application/json
696+
```
697+
698+
#### Example response:
699+
```json
700+
{
701+
"objects": {
702+
"2025-11-10": {
703+
"cnt_total": 2548,
704+
"cnt_with_owner": 0,
705+
"cnt_with_ticket_ref": 0,
706+
"cnt_owner_no_ticket_ref": 0
707+
},
708+
"2025-11-11": {
709+
"cnt_total": 1219,
710+
"cnt_with_owner": 0,
711+
"cnt_with_ticket_ref": 0,
712+
"cnt_owner_no_ticket_ref": 0
713+
},
714+
"2025-11-12": {
715+
"cnt_total": 383,
716+
"cnt_with_owner": 0,
717+
"cnt_with_ticket_ref": 0,
718+
"cnt_owner_no_ticket_ref": 0
719+
}
720+
}
721+
}
722+
```
723+
724+
The following parameters are optional:
725+
726+
| Parameter | Description |
727+
|-------------|---------------------------------------------------------------------------------|
728+
| aggregation | Aggregation type (hourly, daily, weekly, weekday, monthly |
729+
| start | Day on which your report should start (YYYY-mm-dd, defaults to "now - 1 month") |
730+
| end | Day on which your report should end (YYYY-mm-dd, defaults to "now") |

0 commit comments

Comments
 (0)