spam_stats
Creates, updates, deletes, gets or lists a spam_stats resource.
Overview​
| Name | spam_stats |
| Type | Resource |
| Id | ovh.ip.spam_stats |
Fields​
The following fields are returned by SELECT queries:
- list
Spam statistics about an IP address
| Name | Datatype | Description |
|---|---|---|
average_spamscore | integer | Average spam score. (wire: averageSpamscore) |
detected_spams | array | Detailed list of the spams (wire: detectedSpams) |
number_of_spams | integer | Number of spams sent (wire: numberOfSpams) |
timestamp | integer | Time when the IP address was blocked |
total | integer | Number of emails sent |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | from, ip, ip_spamming, to | List spam statistics. Returns emails sent, spams detected and average spam score over the given period. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
from | string (date-time) | Start date |
ip | string (ip-block) | |
ip_spamming | string (ipv4) | IP address which is sending spam (wire: ipSpamming) |
to | string (date-time) | End date |
SELECT examples​
- list
List spam statistics. Returns emails sent, spams detected and average spam score over the given period.
SELECT
average_spamscore,
detected_spams,
number_of_spams,
timestamp,
total
FROM ovh.ip.spam_stats
WHERE from = '{{ from }}' -- required
AND ip = '{{ ip }}' -- required
AND ip_spamming = '{{ ip_spamming }}' -- required
AND to = '{{ to }}' -- required
;