Skip to content
nsin docs

How the traffic behaves over time

GET
/analytics/security/behaviour
curl --request GET \
--url 'https://api.nsin.ir/analytics/security/behaviour?domain=example.com&range=24h' \
--header 'Authorization: Bearer <token>'

Share of asset requests, of requests with cookies and of low bot scores over the last 24 hours (15-minute steps) or 7 days (hourly). A sudden change here is what behaviour detection reacts to.

domain
required
string

The domain name (for example example.com). These endpoints take the domain as a query parameter rather than a path segment.

Example
example.com
range
string
default: 24h
Allowed values: 24h 7d

The series.

Media type application/json
object
available

False until behaviour data is collected.

boolean
step_minutes
integer
Allowed values: 15 60
points
Array<object>
object
t
string format: date-time
requests

Requests judged (verified bots, Under Attack checks and requests your enforced rules blocked are left out).

integer
asset_share

Share of CSS / JS / image / font requests.

number
nullable
cookie_share

Share of requests with cookies; null before the edge logged cookie names.

number
nullable
bot_low_share

Share of requests with a bot score under 30; null where not scored.

number
nullable
Example
{
"step_minutes": 15
}

The domain query parameter is missing.

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 missing
{
"error": "domain is required"
}

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"
}

The domain has no active plan at all, so no plan feature is available on it. Buy or renew a plan for the domain. (A plan that is active but does not include the feature answers 403 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 noPlan
{
"error": "This domain does not have an active plan."
}

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"
}