Get thresholds¶
Fetch global antispam thresholds
- HTTP Method:
GET
- URL:
https://example.domain.tld/api/v1/antispam/thresholds/global/
- Require authentication:
Yes
- Permission level required:
MasterAdmin
Response parameters¶
Parameter | Type | Description |
---|---|---|
scores | dict | The threshold scores object |
add_header | int | Score at which X-Spam header is added (used for sieving to junk folder) |
greylist | int | Score at which message is deferred (greylisted) |
reject | int | Score at which message is rejected |
status | str | Status |
Example request (Python)¶
import requests
import json
from pprint import pprint
url = "https://example.domain.tld/api/v1/antispam/thresholds/global/"
r = requests.get(url, auth=("admin","long-auth_token-here"))
try:
pprint(r.json())
except:
print(r.text)
Example response (JSON)¶
{'scores': {'add_header': 4, 'greylist': 3, 'reject': 10}, 'status': 'applied'}