{"components":{"schemas":{"ASNDetails":{"properties":{"announced":{"type":"boolean"},"announced_v4":{"type":"integer"},"announced_v6":{"type":"integer"},"asn":{"example":132986,"type":"integer"},"country":{"example":"IN","type":"string"},"description":{"type":"string"},"name":{"example":"SYSTGRID-AP SystGrid Solutions Pvt Ltd","type":"string"},"registry":{"example":"APNIC","type":"string"},"total_peers":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"website":{"type":"string"}},"type":"object"},"DataSourceInfo":{"properties":{"description":{"type":"string"},"endpoints":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"}},"type":"object"},"GraphData":{"properties":{"dual_peers":{"type":"integer"},"focus_asn":{"$ref":"#/components/schemas/ASNDetails"},"neighbors":{"items":{"$ref":"#/components/schemas/NeighborLink"},"type":"array"},"total_v4_peers":{"type":"integer"},"total_v6_peers":{"type":"integer"}},"type":"object"},"HealthResponse":{"properties":{"database":{"example":"ok","type":"string"},"status":{"example":"healthy","type":"string"},"time":{"format":"date-time","type":"string"}},"type":"object"},"NeighborLink":{"properties":{"last_observed":{"format":"date-time","type":"string"},"peer_count":{"type":"integer"},"protocol":{"enum":["ipv4","ipv6","both"],"type":"string"},"relation_type":{"enum":["upstream","downstream","peer","uncertain"],"type":"string"},"source_asn":{"type":"integer"},"target_asn":{"type":"integer"},"target_country":{"type":"string"},"target_name":{"type":"string"},"v4_peers":{"type":"integer"},"v6_peers":{"type":"integer"}},"type":"object"},"SearchResult":{"properties":{"asn":{"type":"integer"},"country":{"type":"string"},"description":{"type":"string"},"matched_ip":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"query_type":{"enum":["asn","name","ip","prefix"],"type":"string"}},"type":"object"},"SessionResponse":{"properties":{"expires_at":{"format":"date-time","type":"string"},"token":{"type":"string"},"token_type":{"example":"Bearer","type":"string"}},"type":"object"},"TreeGraphData":{"properties":{"edges":{"items":{"$ref":"#/components/schemas/TreeGraphEdge"},"type":"array"},"focus_asn":{"type":"integer"},"max_depth":{"type":"integer"},"nodes":{"items":{"$ref":"#/components/schemas/TreeGraphNode"},"type":"array"},"proto":{"type":"string"}},"type":"object"},"TreeGraphEdge":{"properties":{"protocol":{"type":"string"},"relation_type":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"}},"type":"object"},"TreeGraphNode":{"properties":{"asn":{"type":"integer"},"country":{"type":"string"},"depth":{"type":"integer"},"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}},"type":"object"},"VersionResponse":{"properties":{"built_at":{"format":"date-time","type":"string"},"commit":{"example":"local","type":"string"},"compliance":{"example":"DPDP Act 2023, Jurisdiction of Mumbai, INDIA","type":"string"},"owner":{"example":"SystGrid Solutions Pvt Ltd","type":"string"},"version":{"example":"v1.0.0-dev","type":"string"}},"type":"object"}},"securitySchemes":{"BearerAuth":{"bearerFormat":"JWT","description":"Cryptographically signed short-lived session token obtained from POST /api/v1/auth/session.","scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"contact@systgrid.com","name":"SystGrid Solutions Support","url":"https://systgrid.com"},"description":"High-performance interactive BGP routing topology, autonomous system interconnectivity, and IPv4/IPv6 propagation intelligence service. Owned and operated by SystGrid Solutions Pvt Ltd (Mumbai, India) under the exclusive jurisdiction of the Courts of Mumbai and in compliance with the DPDP Act 2023.","license":{"name":"Proprietary - SystGrid Solutions Pvt Ltd","url":"https://bgptree.com/terms"},"title":"BGPTree Public \u0026 Intelligence API","version":"v1.0.0-183e972"},"openapi":"3.0.3","paths":{"/api/v1/asn/{asn}":{"get":{"description":"Retrieves comprehensive ASN metadata (organization, country, registry, announced IPv4/IPv6 prefixes) from authoritative RIRs and RIPE Stat.","parameters":[{"description":"Autonomous System Number (e.g. 132986 or AS132986)","in":"path","name":"asn","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ASNDetails"}}},"description":"Authoritative ASN details"},"400":{"description":"Invalid ASN parameter"},"401":{"description":"Missing or invalid JWT Bearer token"},"500":{"description":"Failed to retrieve ASN details"}},"security":[{"BearerAuth":[]}],"summary":"Get ASN overview \u0026 authoritative metadata","tags":["Autonomous Systems"]}},"/api/v1/asn/{asn}/ixps":{"get":{"description":"Retrieves public peering exchange presences (IXPs), port speeds, and IP addresses from PeeringDB.","parameters":[{"description":"Autonomous System Number","in":"path","name":"asn","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List of IXPs where the ASN participates"},"401":{"description":"Missing or invalid JWT Bearer token"}},"security":[{"BearerAuth":[]}],"summary":"Get PeeringDB Internet Exchange Points","tags":["Autonomous Systems"]}},"/api/v1/asn/{asn}/neighbors":{"get":{"description":"Retrieves direct IPv4 and IPv6 BGP routing neighbors categorized by relationship (upstream transit, downstream customer, settlement-free peer).","parameters":[{"description":"Autonomous System Number","in":"path","name":"asn","required":true,"schema":{"type":"integer"}},{"description":"Filter by protocol (all, ipv4, ipv6)","in":"query","name":"proto","required":false,"schema":{"default":"all","enum":["all","ipv4","ipv6"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphData"}}},"description":"Adjacency graph data with neighbors and peer counts"},"400":{"description":"Invalid ASN parameter"},"401":{"description":"Missing or invalid JWT Bearer token"}},"security":[{"BearerAuth":[]}],"summary":"Get direct BGP neighbor adjacencies","tags":["Autonomous Systems"]}},"/api/v1/asn/{asn}/probes":{"get":{"description":"Retrieves active hardware measurement probes and anchors deployed inside the target Autonomous System.","parameters":[{"description":"Autonomous System Number","in":"path","name":"asn","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List of active measurement probes"},"401":{"description":"Missing or invalid JWT Bearer token"}},"security":[{"BearerAuth":[]}],"summary":"Get RIPE Atlas measurement probes","tags":["Routing \u0026 Propagation"]}},"/api/v1/asn/{asn}/tree":{"get":{"description":"Builds a multi-hop directed BGP propagation tree showing Tier 1 backbones, regional upstreams, and customer cascades.","parameters":[{"description":"Focus ASN","in":"path","name":"asn","required":true,"schema":{"type":"integer"}},{"description":"Routing protocol (ipv4 or ipv6)","in":"query","name":"proto","required":false,"schema":{"default":"ipv4","enum":["ipv4","ipv6"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreeGraphData"}}},"description":"Hierarchical multi-hop tree graph data"},"401":{"description":"Missing or invalid JWT Bearer token"}},"security":[{"BearerAuth":[]}],"summary":"Get multi-hop BGP propagation tree","tags":["Routing \u0026 Propagation"]}},"/api/v1/auth/session":{"post":{"description":"Exchanges browser handshake for a short-lived cryptographically signed JWT required for protected endpoints.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}},"description":"Session token generated successfully"},"500":{"description":"Internal server error during token generation"}},"summary":"Create ephemeral session token","tags":["Authentication"]}},"/api/v1/graph/expand":{"post":{"description":"Dynamic multi-hop drill-down endpoint fetching adjacencies for a newly clicked ASN node to expand the interactive topology.","requestBody":{"content":{"application/json":{"schema":{"properties":{"proto":{"default":"all","description":"Routing protocol filter (all, ipv4, ipv6)","type":"string"},"target_asn":{"description":"ASN to expand in topology","type":"integer"}},"required":["target_asn"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphData"}}},"description":"Expanded topology graph data"},"400":{"description":"Invalid target_asn in request body"},"401":{"description":"Missing or invalid JWT Bearer token"}},"security":[{"BearerAuth":[]}],"summary":"Batch expand graph node","tags":["Routing \u0026 Propagation"]}},"/api/v1/health":{"get":{"description":"Returns current service status and backend MariaDB connectivity.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}},"description":"Service is healthy"}},"summary":"Health check","tags":["System \u0026 Discovery"]}},"/api/v1/openapi.json":{"get":{"description":"Returns the complete OpenAPI 3.0 JSON specification for the BGPTree API.","responses":{"200":{"description":"OpenAPI 3.0 JSON specification"}},"summary":"OpenAPI 3.0 specification","tags":["System \u0026 Discovery"]}},"/api/v1/search":{"get":{"description":"Instant search resolving AS numbers, network operator names, IP addresses (authoritative origin ASN lookup), and CIDR prefixes.","parameters":[{"description":"Search term (e.g. 132986, Cloudflare, 1.1.1.1, 8.8.8.0/24)","in":"query","name":"q","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"query":{"type":"string"},"results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array"}},"type":"object"}}},"description":"Search results matching query"},"400":{"description":"Query parameter 'q' is required"},"401":{"description":"Missing or invalid JWT Bearer token"}},"security":[{"BearerAuth":[]}],"summary":"Search ASNs, operators, IPs, or CIDR prefixes","tags":["Autonomous Systems"]}},"/api/v1/sources":{"get":{"description":"Lists all authoritative remote data sources, upstream APIs (RIRs, RIPE Stat, RouteViews, PeeringDB, CAIDA), and attributions.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/DataSourceInfo"},"type":"array"}},"type":"object"}}},"description":"List of active upstream data sources"}},"summary":"Data sources attribution","tags":["System \u0026 Discovery"]}},"/api/v1/version":{"get":{"description":"Returns application version, git commit hash, build timestamp, and legal jurisdiction.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"}}},"description":"Deployment version information"}},"summary":"Version \u0026 Compliance metadata","tags":["System \u0026 Discovery"]}}},"servers":[{"description":"Production Edge API (Cloudflare / Mumbai, INDIA)","url":"https://api.bgptree.com"},{"description":"Local Development Server","url":"http://localhost:8080"}],"tags":[{"description":"Service health checks, version information, attribution sources, and API specifications.","name":"System \u0026 Discovery"},{"description":"Session token generation and JWT authorization.","name":"Authentication"},{"description":"ASN overview, authoritative RIR metadata, BGP adjacencies, and PeeringDB IXP presences.","name":"Autonomous Systems"},{"description":"Multi-hop BGP propagation trees, dynamic graph expansion, and IP/prefix resolution.","name":"Routing \u0026 Propagation"}]}
