API Documentation

Interactive REST API for NetCores network analysis

Checking API status...
Base URL: http://netcores.fi.uba.ar/api

Quick Start

The NetCores API provides programmatic access to network analysis functionality. All endpoints return JSON responses with standardized error handling.

Authentication

Currently, no authentication is required. All endpoints are publicly accessible.

Common Response Codes
  • 200 - Success
  • 400 - Bad Request (validation error)
  • 404 - Not Found
  • 500 - Internal Server Error

Check the health status of the NetCores application and data availability.

Response
{ "status": "healthy", "version": "0.1.0", "data_status": "available", "database": { "status": "healthy", "connection": "ok" } }

Get a summary of available data across all IP versions.

Response
{ "ipv4": { "snapshot_count": 45, "date_range": ["2020-01-01", "2024-08-01"], "total_asns": 75000 }, "ipv6": { "snapshot_count": 32, "date_range": ["2020-01-01", "2024-08-01"], "total_asns": 25000 } }

Get k-core trend analysis for a specific ASN over time.

Parameters
Parameter Type Required Description Example
asn integer Yes Autonomous System Number 3356
ip_version string No IP version (ipv4 or ipv6) ipv4
start_date string No Start date (YYYY-MM-DD) 2020-01-01
end_date string No End date (YYYY-MM-DD) 2024-01-01
Example Request
curl "http://netcores.fi.uba.ar/api/trends/3356?ip_version=ipv4&start_date=2020-01-01"
Response
{ "asn": 3356, "ip_version": "ipv4", "date_range": { "start": "2020-01-01", "end": "2024-08-01" }, "trend_data": [ { "date": "2020-01-01", "shell_index": 45, "max_shell_index": 50, "normalized_shell_index": 0.90 } ] }

Get k-core trend analysis for multiple ASNs with comparative data.

Request Body
{ "asns": [3356, 15169, 2906], "ip_version": "ipv4", "start_date": "2020-01-01", "end_date": "2024-01-01" }
Example Request
curl -X POST "http://netcores.fi.uba.ar/api/trends" \ -H "Content-Type: application/json" \ -d '{ "asns": [3356, 15169, 2906], "ip_version": "ipv4" }'
Response
{ "asns": [3356, 15169, 2906], "ip_version": "ipv4", "date_range": { "start": "2020-01-01", "end": "2024-08-01" }, "trend_data": { "3356": [ { "date": "2020-01-01", "shell_index": 45, "max_shell_index": 50, "normalized_shell_index": 0.90 } ], "15169": [...], "2906": [...] } }

Trigger a refresh of AS-relationship data from CAIDA sources.

Request Body
{ "ip_versions": ["ipv4", "ipv6"] }
Response
{ "ipv4": { "processed": true, "snapshots_added": 2, "latest_date": "2024-08-01" }, "ipv6": { "processed": true, "snapshots_added": 1, "latest_date": "2024-08-01" } }

Get the current status of the automatic update scheduler.

Response
{ "running": true, "next_run": "2024-09-06T00:00:00Z", "enabled": true, "schedule": "0 0 6 * *" }

Trigger a manual check for new data and update the database if new snapshots are available.

Response
{ "triggered": true, "results": { "ipv4": { "checked": true, "updated": false, "new_snapshots": 0, "error": null }, "ipv6": { "checked": true, "updated": true, "new_snapshots": 1, "error": null } }, "timestamp": "2024-08-11T12:00:00Z" }

Get information about available network snapshots in the database.

Parameters
Parameter Type Required Description
ip_version string No Filter by IP version (ipv4 or ipv6)
Response
{ "ipv4": [ { "date": "2024-08-01", "max_shell_index": 50, "unique_asns": 75000 }, { "date": "2024-07-01", "max_shell_index": 49, "unique_asns": 74500 } ], "ipv6": [...] }

Common ASN References

Major Transit Providers
  • 3356 - Level3 (now Lumen)
  • 1299 - Telia Carrier
  • 174 - Cogent Communications
  • 2914 - NTT Communications
  • 3257 - GTT Communications
Major Content Providers
  • 714 - Apple
  • 2906 - Netflix
  • 15169 - Google
  • 16509 - Amazon
  • 32934 - Facebook (Meta)
  • 8075 - Microsoft