How the traffic behaves over time
const url = 'https://api.nsin.ir/analytics/security/behaviour?domain=example.com&range=24h';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”The domain name (for example example.com). These endpoints take the
domain as a query parameter rather than a path segment.
Example
example.comResponses
Section titled “ Responses ”The series.
object
False until behaviour data is collected.
object
Requests judged (verified bots, Under Attack checks and requests your enforced rules blocked are left out).
Share of CSS / JS / image / font requests.
Share of requests with cookies; null before the edge logged cookie names.
Share of requests with a bot score under 30; null where not scored.
Example
{ "step_minutes": 15}The domain query parameter is missing.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "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.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "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.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}