Skip to content

API Overview

The ASN Risk API provides RESTful access to risk scores and analytics.

Base URL

http://localhost:80/api

For production deployments, use HTTPS with a reverse proxy.

Authentication

All scoring endpoints require an API key passed via the X-API-Key header.

bash
curl -H "X-API-Key: your-api-key" http://localhost:80/api/v1/asn/15169

See Authentication for details.

Response Format

All responses are JSON with the following structure for successful requests:

json
{
  "asn": 15169,
  "name": "GOOGLE",
  "risk_score": 85,
  ...
}

Error responses follow RFC 7807:

json
{
  "detail": "ASN not found or not yet scored"
}

Rate Limiting

Default limits:

  • 100 requests per minute per API key
  • 1000 ASNs per bulk request

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1704067200

Endpoints Summary

MethodEndpointDescription
GET/Service information
GET/healthHealth check
GET/asn/{asn}Get ASN risk score
GET/asn/{asn}/historyGet score history
POST/tools/bulk-risk-checkBulk ASN analysis
POST/whitelistAdd ASN to whitelist

OpenAPI Specification

Interactive documentation is available at:

  • Swagger UI: http://localhost:80/api/docs
  • ReDoc: http://localhost:80/api/redoc
  • OpenAPI JSON: http://localhost:80/api/openapi.json

ASN Risk Intelligence Platform