Generic
List all generic settings
Request
Definizione
GET /api/v1/settings/generic
Headers
-
Authorization
requiredAuthentication token with privileges to view the resource.
Bearer {token}
Response
Status codes
Status code | Message |
---|---|
200 | "List of generic settings" |
403 | "Forbidden" |
Body
- Attributes
- Example
-
data.settings.mailer.host
stringHost of the email server being used.
-
data.settings.mailer.password
stringPassword of the email address used.
-
data.settings.mailer.port
integerport of the email server being used.
-
data.settings.mailer.ssl
booleanIf true, the transfer will be made using the SSL protocol.
-
data.settings.mailer.username
stringEmail address used.
-
data.settings.retention.audit_retention_days
integerNumber of days for which recorded activities are retained.
-
data.settings.retention.deleted_rules_retention_days
integerNumber of days that deleted rules are retained and displayed.
-
data.settings.retention.handled_alerts_retention_days
integerNumber of days that alerts that have already been processed are retained and displayed.
-
data.settings.retention.hourly_trends_retention_days
integerNumber of days for which hourly trends are stored and displayed.
-
data.settings.retention.http_traffic_retention_days
integerNumber of days transactions are stored and displayed.
{
"data": {
"settings": {
"mailer": {
"host": "smtps.xxxx.it",
"password": "xxxxx",
"port": 465,
"ssl": true,
"username": "test@test.it"
},
"retention": {
"audit_retention_days": 90,
"deleted_rules_retention_days": 90,
"handled_alerts_retention_days": 90,
"hourly_trends_retention_days": 365,
"http_traffic_retention_days": 7
}
}
},
"message": "List of generic settings",
"status": "ok"
}
Update generic settings
Request
Definizione
PUT /api/v1/settings/generic
Headers
-
Authorization
requiredAuthentication token with privileges to view the resource.
Bearer {token}
Request body
{
"mailer": {
"port": 587,
"ssl": false
},
"retention": {
"audit_retention_days": 120,
"http_traffic_retention_days": 14
}
}
Response
Status codes
Status code | Messaggio |
---|---|
200 | "Generic settings updated" |
400 | "Generic error" |
400 | "Error updating generic settings" |
403 | "Forbidden" |
Body
{
"data": {
"settings": {
"mailer": {
"host": "smtps.xxxxx.it",
"password": "",
"port": 587,
"ssl": false,
"username": "test@test.it"
},
"retention": {
"audit_retention_days": 120,
"deleted_rules_retention_days": 90,
"handled_alerts_retention_days": 90,
"hourly_trends_retention_days": 365,
"http_traffic_retention_days": 14
}
}
},
"message": "Generic settings updated",
"status": "ok"
}