List detected attacks
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Attacks NSIN detected on the domain, newest first. An attack is a flood
of at least 5× the domain's usual requests per minute for this hour
(and at least 3000 per minute) for two minutes. NSIN then looks for what
only the attack's requests have (fingerprint, cookie name, path, …)
and, when automatic attack rules are on, adds a managed custom rule in
dry run (managed_by: attack_signature): it only counts what it would
block until it is enforced. An attack ends — and its rule is switched
off — after 30 minutes back near normal traffic. active is the open
attack, if any. Requires domain.view.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Query parameters
- limitintegerqueryDefault:
50
Responses
200The attacks.
Content type: application/json
- attacksarray of Attack
Item fields
- idinteger
- domain_idinteger
- domain_namestring
- statusstringOne of:
"detected""mitigating""ended""ignored" - kindstring
volume: a flood, far more requests than usual.behaviour: the traffic suddenly behaves differently (for example no CSS/JS/image requests, no cookies, one HTTP version only), even at normal volume. A behaviour attack ends after 30 minutes without the change.One of:"volume""behaviour" - driftarray of AttackDrift
What changed (behaviour attacks; empty for floods), strongest first, at most 8.
Item fields
- featurestringOne of:
"asset""html""api""no_referer""no_cookie""many_cookie""s2""s3""s4""s404""s5""post""other_method""h1""h2""h3""bot_low""bot_high""req_per_path""req_per_ip" - groupstringOne of:
"assets""cookies""status""protocol""bot""paths""ips" - unitstring
share: 0–1 of requests.ratio: requests per path or per IP.One of:"share""ratio" - normalnumber
The usual value at this hour of day.
- nownumber
The value during the attack.
- znumber
How unusual the change is (larger = stronger).
- started_atstring (date-time)
- ended_atstring (date-time) | null
- calm_sincestring (date-time) | null
- peak_rpminteger
Highest requests per minute seen.
- baseline_rpmnumber
Usual requests per minute for this hour of day.
- signatureobject
Fields
- featuresarray of AttackSignatureFeature
Item fields
- fieldstringOne of:
"ja4h""ja4""user_agent""cookie""header_set_hash""path""method""asn""country" - keystring
The cookie name for
cookie; else empty. - valuestring
- coveragenumber
Share of the attack's requests with this value (0–1).
- baseline_sharenumber
Share of normal requests with this value (0–1).
- expressionstring
The rule's conditions as text; empty without a rule.
- attack_requestsinteger
- baseline_requestsinteger
- baseline_windowstring
reference_day: the same time on the most normal recent day (behaviour attacks).One of:"hour_before""day_before""reference_day""none"
- coveragenumber
Share of the attack the rule matches.
- fp_estimatenumber
Share of normal requests the rule would have hit; -1 = unknown.
- rule_idinteger | null
- ruleobject | null
Fields
- idinteger
- namestring
- enabledboolean
- action_modestringOne of:
"enforce""dry_run"
- enforced_bystring
"", "user:
" or "admin: ". - notestring
- created_atstring (date-time)
- updated_atstring (date-time)
- activeobject | null
Fields
- idinteger
- domain_idinteger
- domain_namestring
- statusstringOne of:
"detected""mitigating""ended""ignored" - kindstring
volume: a flood, far more requests than usual.behaviour: the traffic suddenly behaves differently (for example no CSS/JS/image requests, no cookies, one HTTP version only), even at normal volume. A behaviour attack ends after 30 minutes without the change.One of:"volume""behaviour" - driftarray of AttackDrift
What changed (behaviour attacks; empty for floods), strongest first, at most 8.
Item fields
- featurestringOne of:
"asset""html""api""no_referer""no_cookie""many_cookie""s2""s3""s4""s404""s5""post""other_method""h1""h2""h3""bot_low""bot_high""req_per_path""req_per_ip" - groupstringOne of:
"assets""cookies""status""protocol""bot""paths""ips" - unitstring
share: 0–1 of requests.ratio: requests per path or per IP.One of:"share""ratio" - normalnumber
The usual value at this hour of day.
- nownumber
The value during the attack.
- znumber
How unusual the change is (larger = stronger).
- started_atstring (date-time)
- ended_atstring (date-time) | null
- calm_sincestring (date-time) | null
- peak_rpminteger
Highest requests per minute seen.
- baseline_rpmnumber
Usual requests per minute for this hour of day.
- signatureobject
Fields
- featuresarray of AttackSignatureFeature
Item fields
- fieldstringOne of:
"ja4h""ja4""user_agent""cookie""header_set_hash""path""method""asn""country" - keystring
The cookie name for
cookie; else empty. - valuestring
- coveragenumber
Share of the attack's requests with this value (0–1).
- baseline_sharenumber
Share of normal requests with this value (0–1).
- expressionstring
The rule's conditions as text; empty without a rule.
- attack_requestsinteger
- baseline_requestsinteger
- baseline_windowstring
reference_day: the same time on the most normal recent day (behaviour attacks).One of:"hour_before""day_before""reference_day""none"
- coveragenumber
Share of the attack the rule matches.
- fp_estimatenumber
Share of normal requests the rule would have hit; -1 = unknown.
- rule_idinteger | null
- ruleobject | null
Fields
- idinteger
- namestring
- enabledboolean
- action_modestringOne of:
"enforce""dry_run"
- enforced_bystring
"", "user:
" or "admin: ". - notestring
- created_atstring (date-time)
- updated_atstring (date-time)
{
"attacks": [
{
"id": 0,
"domain_id": 0,
"domain_name": "string",
"status": "detected",
"kind": "volume",
"drift": [
{
"feature": "asset",
"group": "assets",
"unit": "share",
"normal": 0,
"now": 0,
"z": 0
}
],
"started_at": "2026-01-01T00:00:00Z",
"ended_at": "2026-01-01T00:00:00Z",
"calm_since": "2026-01-01T00:00:00Z",
"peak_rpm": 0,
"baseline_rpm": 0,
"signature": {
"features": [
{
"field": "ja4h",
"key": null,
"value": null,
"coverage": null,
"baseline_share": null
}
],
"expression": "string",
"attack_requests": 0,
"baseline_requests": 0,
"baseline_window": "hour_before"
},
"coverage": 0,
"fp_estimate": 0,
"rule_id": 0,
"rule": {
"id": 0,
"name": "string",
"enabled": true,
"action_mode": "enforce"
},
"enforced_by": "string",
"note": "string",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}
],
"active": {
"id": 0,
"domain_id": 0,
"domain_name": "string",
"status": "detected",
"kind": "volume",
"drift": [
{
"feature": "asset",
"group": "assets",
"unit": "share",
"normal": 0,
"now": 0,
"z": 0
}
],
"started_at": "2026-01-01T00:00:00Z",
"ended_at": "2026-01-01T00:00:00Z",
"calm_since": "2026-01-01T00:00:00Z",
"peak_rpm": 0,
"baseline_rpm": 0,
"signature": {
"features": [
{
"field": "ja4h",
"key": "string",
"value": "string",
"coverage": 0,
"baseline_share": 0
}
],
"expression": "string",
"attack_requests": 0,
"baseline_requests": 0,
"baseline_window": "hour_before"
},
"coverage": 0,
"fp_estimate": 0,
"rule_id": 0,
"rule": {
"id": 0,
"name": "string",
"enabled": true,
"action_mode": "enforce"
},
"enforced_by": "string",
"note": "string",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}
}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/attacks" \
-H "Authorization: Bearer $NSIN_API_KEY"