Skip to content
nsin docs

Get the automatic attack switches

GET
/domains/{domain}/attack-settings
curl --request GET \
--url https://api.nsin.ir/domains/example.com/attack-settings \
--header 'Authorization: Bearer <token>'

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.

domain
required
string

The domain name (for example example.com) — not a numeric id.

Example
example.com

The switch.

Media type application/json
object
auto_attack_rules

Add a dry-run rule when an attack is detected (default true).

boolean
auto_under_attack

Switch Under Attack Mode on by itself during an attack nothing blocks, and off when it ends (default false).

boolean
behaviour_detection

Record an attack when the traffic suddenly behaves differently, even at normal volume (default true). Rules still need auto_attack_rules.

boolean
detection_ready

False while the domain is younger than 3 days: automatic detection needs 3 days of normal traffic first. Ignored in PUT.

boolean
Example generated
{
"auto_attack_rules": true,
"auto_under_attack": true,
"behaviour_detection": true
}

Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}