Configuring Event Reports
Configuring Event Reports is available through the Agent’s REST API (accessible from http://localhost:5000/swagger
).
Viewing Event Reports configuration
To view the current Event Reports configuration, send a GET request to /settings/reports/file-event-report
:
GET /settings/reports/file-event-report HTTP/1.1
Host:
Authorization: Basic username:password
api-version: text
Accept: */*
Success
{
"enabled": true,
"timeZone": "text",
"scheduledHours": [
"02:38:49"
]
}
By default, Event Reports use the following settings:
enabled
:false
Time zone: UTC
Reporting time: 08:00 AM
Listing time zones
To get the list of available time zones, send a GET request to /settings/reports/file-event-report/timezones
.
GET /settings/reports/file-event-report/timezones HTTP/1.1
Host:
Authorization: Basic username:password
api-version: text
Accept: */*
Success
[
{
"id": "text",
"offset": "text"
}
]
Listed time zones include offset, which accounts for daylight saving time.
Modifying Event Reports configuration
You can enable Event Reports and set the time zone using a PUT request to /settings/reports/file-event-report
:
PUT /settings/reports/file-event-report HTTP/1.1
Host:
Authorization: Basic username:password
api-version: text
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 34
{
"enabled": true,
"timeZone": "text"
}
{
"enabled": true,
"timeZone": "text",
"scheduledHours": [
"02:38:49"
]
}
For example, to enable Event Reports and set the time zone to Europe/Warsaw
:
{
"enabled": true,
"timeZone": "Europe/Warsaw",
}
Adding Event Reports reporting hours
To add new Event Reports reporting time, send a POST request to /settings/reports/file-event-report/hours
with the time in HH:MM:SS format.
POST /settings/reports/file-event-report/hours HTTP/1.1
Host:
Authorization: Basic username:password
api-version: text
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 19
{
"hour": "02:38:49"
}
{
"enabled": true,
"timeZone": "text",
"scheduledHours": [
"02:38:49"
]
}
For example, to add 8 AM and noon as reporting hours:
{
"enabled": true,
"timeZone": "Europe/Warsaw",
"scheduledHours": [
"08:00:00",
"12:00:00"
]
}
Deleting Event Reports reporting hours
You can remove reporting hours using a DELETE request to /settings/reports/file-event-report/hours
with the time you want to remove in HH:MM:SS format.
DELETE /settings/reports/file-event-report/hours HTTP/1.1
Host:
Authorization: Basic username:password
api-version: text
Accept: */*
{
"enabled": true,
"timeZone": "text",
"scheduledHours": [
"02:38:49"
]
}
For example, to remove 8 AM from the reporting hours:
{
"enabled": true,
"timeZone": "Europe/Warsaw",
"scheduledHours": [
"08:00:00",
]
}