Get the automatic attack switches
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Whether automatic attack detection may add a blocking rule (in dry run)
when it detects an attack on this domain (on by default), whether
Under Attack Mode switches on by itself during an attack nothing
blocks (off by default), and whether behaviour detection watches the
domain (on by default). Requires domain.view.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Responses
200The switch.
Content type: application/json
- auto_attack_rulesboolean
Add a dry-run rule when an attack is detected (default true).
- auto_under_attackboolean
Switch Under Attack Mode on by itself during an attack nothing blocks, and off when it ends (default false).
- behaviour_detectionboolean
Record an attack when the traffic suddenly behaves differently, even at normal volume (default true). Rules still need auto_attack_rules.
- detection_readyboolean
False while the domain is younger than 3 days: automatic detection needs 3 days of normal traffic first. Ignored in PUT.
{
"auto_attack_rules": true,
"auto_under_attack": true,
"behaviour_detection": true,
"detection_ready": true
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}Example request
curl -X GET "https://api.nsin.ir/domains/example.com/attack-settings" \
-H "Authorization: Bearer $NSIN_API_KEY"