openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 servers: - url: /api paths: /healthz: get: operationId: healthCheck tags: [system] responses: "200": description: ok content: application/json: schema: $ref: "#/components/schemas/HealthCheck" /collection/start: post: operationId: startCollection tags: [collection] requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/StartCollectionRequest" responses: "200": description: started content: application/json: schema: $ref: "#/components/schemas/CollectionJob" "409": description: already running /collection/stop: post: operationId: stopCollection tags: [collection] responses: "200": description: stopping content: application/json: schema: $ref: "#/components/schemas/CollectionJob" "404": description: no active job /collection/status: get: operationId: getCollectionStatus tags: [collection] responses: "200": description: current job status (or last completed) content: application/json: schema: $ref: "#/components/schemas/CollectionStatus" /collection/jobs: get: operationId: listCollectionJobs tags: [collection] responses: "200": description: history of collection jobs content: application/json: schema: type: array items: $ref: "#/components/schemas/CollectionJob" /collection/sources: get: operationId: listKnownSources tags: [collection] responses: "200": description: configured RIR sources content: application/json: schema: type: array items: $ref: "#/components/schemas/KnownSource" /enrichment/start: post: operationId: startEnrichment tags: [enrichment] requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/StartEnrichmentRequest" responses: "200": description: started content: application/json: schema: $ref: "#/components/schemas/EnrichmentJob" "409": description: already running /enrichment/stop: post: operationId: stopEnrichment tags: [enrichment] responses: "200": description: stopping content: application/json: schema: $ref: "#/components/schemas/EnrichmentJob" "404": description: no active job /enrichment/status: get: operationId: getEnrichmentStatus tags: [enrichment] responses: "200": description: current enrichment job status (or last completed) content: application/json: schema: $ref: "#/components/schemas/EnrichmentStatus" /enrichment/jobs: get: operationId: listEnrichmentJobs tags: [enrichment] responses: "200": description: history of enrichment jobs content: application/json: schema: type: array items: $ref: "#/components/schemas/EnrichmentJob" /enrichment/sources: get: operationId: listEnrichmentSources tags: [enrichment] responses: "200": description: configured enrichment sources content: application/json: schema: type: array items: $ref: "#/components/schemas/EnrichmentSourceInfo" /stats/enrichment: get: operationId: getEnrichmentStats tags: [stats] responses: "200": description: cloud / threat / asn-name coverage breakdown content: application/json: schema: $ref: "#/components/schemas/EnrichmentStats" /stats/overview: get: operationId: getDatabaseOverview tags: [stats] responses: "200": description: database-wide totals content: application/json: schema: $ref: "#/components/schemas/DatabaseOverview" /stats/countries: get: operationId: getCountryDistribution tags: [stats] responses: "200": description: top countries by allocation count content: application/json: schema: type: array items: $ref: "#/components/schemas/CountryStat" /stats/rirs: get: operationId: getRirDistribution tags: [stats] responses: "200": description: blocks per RIR content: application/json: schema: type: array items: $ref: "#/components/schemas/RirStat" /stats/families: get: operationId: getFamilyDistribution tags: [stats] responses: "200": description: ipv4 vs ipv6 vs asn counts content: application/json: schema: $ref: "#/components/schemas/FamilyStats" /stats/timeline: get: operationId: getRegistrationTimeline tags: [stats] responses: "200": description: yearly allocation timeline content: application/json: schema: type: array items: $ref: "#/components/schemas/TimelineBucket" /export/blocks.csv: get: operationId: exportBlocksCsv tags: [export] responses: "200": description: streaming CSV of all ingested blocks content: text/csv: schema: type: string /export/blocks.json: get: operationId: exportBlocksJson tags: [export] responses: "200": description: streaming NDJSON of all ingested blocks content: application/x-ndjson: schema: type: string /lookup/ip/{ip}: get: operationId: lookupIp tags: [lookup] parameters: - name: ip in: path required: true schema: type: string responses: "200": description: enriched IP record content: application/json: schema: $ref: "#/components/schemas/IpLookupResult" "400": description: invalid IP address /lookup/asn/{asn}: get: operationId: lookupAsn tags: [lookup] parameters: - name: asn in: path required: true schema: type: string responses: "200": description: ASN record content: application/json: schema: $ref: "#/components/schemas/AsnLookupResult" "404": description: ASN not found /lookup/bulk: post: operationId: lookupBulkIps tags: [lookup] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BulkLookupRequest" responses: "200": description: bulk lookup results content: application/json: schema: $ref: "#/components/schemas/BulkLookupResponse" /lookup/cache/stats: get: operationId: getLookupCacheStats tags: [lookup] responses: "200": description: LRU cache statistics content: application/json: schema: $ref: "#/components/schemas/LookupCacheStats" /cron/schedules: get: operationId: getCronSchedules tags: [cron] responses: "200": description: all cron schedule states content: application/json: schema: type: array items: $ref: "#/components/schemas/CronSchedule" /cron/schedules/{name}: put: operationId: updateCronSchedule tags: [cron] parameters: - name: name in: path required: true schema: type: string enum: [collection, enrichment] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CronScheduleInput" responses: "200": description: updated schedules content: application/json: schema: type: array items: $ref: "#/components/schemas/CronSchedule" "400": description: invalid expression content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /cron/trigger/{name}: post: operationId: triggerCronJob tags: [cron] parameters: - name: name in: path required: true schema: type: string enum: [collection, enrichment] responses: "200": description: job triggered content: application/json: schema: $ref: "#/components/schemas/CronTriggerResponse" "400": description: unknown job name content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /settings: get: operationId: getSettings tags: [settings] description: Effective ip-insight.config.json settings (collector + lookup), read-only. responses: "200": description: effective settings content: application/json: schema: $ref: "#/components/schemas/Settings" /summary: get: operationId: getDatabaseSummary tags: [settings] description: Snapshot of database contents by RIR/family/status, enrichment table sizes, last run per source. responses: "200": description: database summary content: application/json: schema: $ref: "#/components/schemas/DatabaseSummary" /collection/jobs/resumable: get: operationId: listResumableCollectionJobs tags: [collection] responses: "200": description: interrupted collection jobs that can be resumed content: application/json: schema: type: array items: $ref: "#/components/schemas/ResumableJob" /collection/resume: post: operationId: resumeCollection tags: [collection] requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/ResumeJobRequest" responses: "200": description: resumed content: application/json: schema: $ref: "#/components/schemas/CollectionJob" "400": description: nothing to resume / invalid job ref content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "409": description: already running content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /enrichment/jobs/resumable: get: operationId: listResumableEnrichmentJobs tags: [enrichment] responses: "200": description: interrupted enrichment jobs that can be resumed content: application/json: schema: type: array items: $ref: "#/components/schemas/ResumableJob" /enrichment/resume: post: operationId: resumeEnrichment tags: [enrichment] requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/ResumeJobRequest" responses: "200": description: resumed content: application/json: schema: $ref: "#/components/schemas/EnrichmentJob" "400": description: nothing to resume / invalid job ref content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "409": description: already running content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /backups: get: operationId: listBackups tags: [backups] responses: "200": description: backup history content: application/json: schema: type: array items: $ref: "#/components/schemas/BackupRun" post: operationId: createBackup tags: [backups] description: Takes a pg_dump snapshot now (requires pg_dump on PATH). responses: "200": description: backup completed content: application/json: schema: $ref: "#/components/schemas/BackupRun" "500": description: backup failed (e.g. pg_dump not found) content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /backups/restore: post: operationId: restoreBackupEndpoint tags: [backups] description: DESTRUCTIVE — overwrites the current database with the backup's contents. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RestoreBackupRequest" responses: "200": description: restored "400": description: invalid file / restore failed content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" components: schemas: HealthCheck: type: object additionalProperties: false required: [status] properties: status: type: string StartCollectionRequest: type: object additionalProperties: false properties: sources: type: array description: optional list of RIR codes; if omitted all configured sources are run items: type: string enum: [arin, ripencc, apnic, lacnic, afrinic] CollectionJob: type: object additionalProperties: false required: [ id, status, startedAt, totalIngested, totalSkipped, ] properties: id: type: string status: type: string enum: [pending, running, stopping, completed, completed_with_errors, stopped, failed, interrupted] startedAt: type: string format: date-time endedAt: type: [string, "null"] format: date-time totalIngested: type: integer totalSkipped: type: integer durationMs: type: [integer, "null"] errorMessage: type: [string, "null"] SourceProgress: type: object additionalProperties: false required: [ rir, url, status, recordsIngested, recordsSkipped, bytesDownloaded, ipv4Count, ipv6Count, asnCount, ] properties: rir: type: string url: type: string status: type: string enum: [pending, downloading, parsing, completed, failed, stopped, skipped] recordsIngested: type: integer recordsSkipped: type: integer bytesDownloaded: type: integer ipv4Count: type: integer ipv6Count: type: integer asnCount: type: integer startedAt: type: [string, "null"] format: date-time endedAt: type: [string, "null"] format: date-time errorMessage: type: [string, "null"] recordsPerSecond: type: number CollectionStatus: type: object additionalProperties: false required: [job, sources, isActive] properties: isActive: type: boolean job: oneOf: - $ref: "#/components/schemas/CollectionJob" - type: "null" sources: type: array items: $ref: "#/components/schemas/SourceProgress" ratePerSecond: type: number KnownSource: type: object additionalProperties: false required: [rir, displayName, region, url] properties: rir: type: string displayName: type: string region: type: string url: type: string StartEnrichmentRequest: type: object additionalProperties: false properties: sources: type: array description: optional list of enrichment source ids; if omitted all configured sources are run items: type: string EnrichmentJob: type: object additionalProperties: false required: [id, status, startedAt, totalIngested, totalSkipped] properties: id: type: string status: type: string enum: [pending, running, stopping, completed, completed_with_errors, stopped, failed, interrupted] startedAt: type: string format: date-time endedAt: type: [string, "null"] format: date-time totalIngested: type: integer totalSkipped: type: integer durationMs: type: [integer, "null"] errorMessage: type: [string, "null"] EnrichmentSourceProgress: type: object additionalProperties: false required: [ sourceId, kind, url, status, recordsIngested, recordsSkipped, bytesDownloaded, ] properties: sourceId: type: string kind: type: string enum: [asn-name, bgp-origin, cloud, geofeed, geocoding, threat, special-purpose, derived] url: type: [string, "null"] description: "Absent for 'derived' sources, which compute from tables already in this database instead of downloading anything." status: type: string enum: [pending, downloading, parsing, completed, failed, stopped, skipped] recordsIngested: type: integer recordsSkipped: type: integer bytesDownloaded: type: integer startedAt: type: [string, "null"] format: date-time endedAt: type: [string, "null"] format: date-time errorMessage: type: [string, "null"] EnrichmentStatus: type: object additionalProperties: false required: [isActive, sources] properties: isActive: type: boolean job: oneOf: - $ref: "#/components/schemas/EnrichmentJob" - type: "null" sources: type: array items: $ref: "#/components/schemas/EnrichmentSourceProgress" EnrichmentSourceInfo: type: object additionalProperties: false required: [id, displayName, description, kind, url] properties: id: type: string displayName: type: string description: type: string kind: type: string enum: [asn-name, bgp-origin, cloud, geofeed, geocoding, threat, special-purpose, derived] url: type: [string, "null"] description: "Absent for 'derived' sources, which compute from tables already in this database instead of downloading anything." provider: type: [string, "null"] source: type: [string, "null"] EnrichmentStats: type: object additionalProperties: false required: [ totalCloudRanges, totalThreatRanges, asnNamedCount, asnTotalCount, totalBgpOriginRanges, totalGeofeedRanges, cloudByProvider, threatBySource, ] properties: totalCloudRanges: type: integer totalThreatRanges: type: integer asnNamedCount: type: integer description: ASN blocks with a holder name populated asnTotalCount: type: integer totalBgpOriginRanges: type: integer description: "Layer 1 coverage — announced prefixes resolvable to an ASN locally, without a live RIPE Stat call." totalGeofeedRanges: type: integer description: "Layer 2 coverage — prefixes with an operator-published RFC 8805 geofeed city hint." cloudByProvider: type: array items: type: object additionalProperties: false required: [provider, ipv4, ipv6] properties: provider: type: string ipv4: type: integer ipv6: type: integer threatBySource: type: array items: type: object additionalProperties: false required: [source, count] properties: source: type: string count: type: integer DatabaseOverview: type: object additionalProperties: false required: [ totalBlocks, ipv4Blocks, ipv6Blocks, asnBlocks, totalCountries, totalRirs, totalIpv4Addresses, totalIpv6Prefixes, lastIngestAt, ] properties: totalBlocks: type: integer ipv4Blocks: type: integer ipv6Blocks: type: integer asnBlocks: type: integer totalCountries: type: integer totalRirs: type: integer totalIpv4Addresses: type: number description: sum of (end-start+1) across all ipv4 blocks totalIpv6Prefixes: type: integer lastIngestAt: type: [string, "null"] format: date-time CountryStat: type: object additionalProperties: false required: [country, ipv4Blocks, ipv6Blocks, asnBlocks, totalBlocks, ipv4Addresses] properties: country: type: string ipv4Blocks: type: integer ipv6Blocks: type: integer asnBlocks: type: integer totalBlocks: type: integer ipv4Addresses: type: number RirStat: type: object additionalProperties: false required: [rir, ipv4Blocks, ipv6Blocks, asnBlocks, totalBlocks] properties: rir: type: string ipv4Blocks: type: integer ipv6Blocks: type: integer asnBlocks: type: integer totalBlocks: type: integer FamilyStats: type: object additionalProperties: false required: [ipv4Blocks, ipv6Blocks, asnBlocks] properties: ipv4Blocks: type: integer ipv6Blocks: type: integer asnBlocks: type: integer TimelineBucket: type: object additionalProperties: false required: [year, ipv4, ipv6, asn] properties: year: type: integer ipv4: type: integer ipv6: type: integer asn: type: integer IpLookupGeo: type: object additionalProperties: false required: [country, city, region, postal, latitude, longitude, timezone, geo_source] properties: country: { type: string, nullable: true, description: "ISO-3166 alpha-2 code. Always a real code or null — never a sentinel value; see anycast/geo_source for the distributed-traffic case." } city: { type: string, nullable: true } postal: { type: string, nullable: true, description: "Only ever from an operator-published RFC 8805 geofeed — the one source that carries it. Null for the country-estimate fallback, which knows a country and nothing finer." } region: { type: string, nullable: true, description: "GeoNames admin1 code (province/state) when available from a geofeed or country-estimate hit; a code, not a human-readable name" } latitude: { type: number, nullable: true } longitude: { type: number, nullable: true } timezone: { type: string, nullable: true, description: "IANA timezone (e.g. 'America/New_York')" } geo_source: type: string nullable: true enum: [geofeed, country-estimate, anycast, null] description: "How city/region were derived. 'geofeed': RFC 8805 self-published feed, high confidence. 'country-estimate': no geofeed covers this prefix, so this is the most populous place GeoNames has for the RIR-registered country — a coarse guess, always paired with a low confidence.geo score. 'anycast': this address is announced from many locations at once, so no single city/region is meaningful (see the top-level anycast field). 'null': no geo data at all." IpLookupNetwork: type: object additionalProperties: false required: [cidr, network_name, allocation_date, rir, status] properties: cidr: { type: string, nullable: true } network_name: { type: string, nullable: true } allocation_date: { type: string, nullable: true, description: "ISO date (YYYY-MM-DD) when the prefix was allocated by the RIR" } rir: { type: string, nullable: true } status: type: string nullable: true enum: [allocated, assigned, reserved, available, null] description: "The RIR's own status for this block: 'allocated' (in active use), 'assigned' (end-user assignment), 'reserved' (held back by the RIR, not yet delegated), 'available' (unallocated, free for the RIR to hand out), or null (no matching block, or the 'network_status' lookup feature is disabled)." IpLookupAsn: type: object additionalProperties: false required: [number, name, type, source, rank, originated_prefixes, originated_prefixes_v6, originated_addresses, peer_visibility] properties: number: { type: integer, nullable: true } name: { type: string, nullable: true } type: type: string nullable: true enum: [hosting, isp, mobile, enterprise, cdn, other, null] description: "Classification of the AS holder. 'null' if unknown." source: type: string nullable: true enum: [bgp-ris, ripe-stat, null] description: "How the ASN was resolved. 'bgp-ris': local longest-prefix match against ingested BGP routing tables (Layer 1 primary, high confidence, works uniformly regardless of the ASN's size or popularity). 'ripe-stat': live RIPE Stat API fallback, used only when the local table has no match yet." rank: type: integer nullable: true description: "Rank by announced IPv4 address space among all originating ASNs (1 = largest), computed locally from the ingested BGP table — not a third-party score. This is a size rank, not an importance rank: a CDN announcing little space but present in every routing table ranks low here despite being highly significant; see peer_visibility for reach. Null when the ASN originates nothing, or the 'asn_reach' lookup feature is disabled." originated_prefixes: type: integer nullable: true description: "Prefixes this ASN originates, both address families." originated_prefixes_v6: type: integer nullable: true description: "IPv6 subset of originated_prefixes. IPv6 space is counted in prefixes rather than addresses — a single /32 covers 2^96 addresses, which is not comparable to an IPv4 address count." originated_addresses: type: integer nullable: true description: "Total IPv4 addresses announced across all of this ASN's prefixes." peer_visibility: type: integer nullable: true description: "How many RIPE RIS route collectors see this ASN's best-propagated prefix — a proxy for how globally visible the network is." IpLookupAnonymity: type: object additionalProperties: false required: [is_tor, is_vpn, is_proxy, providers] description: "Membership of services that publish their egress addresses. Says nothing about residential/mobile proxy networks, which deliberately do not publish — absence here is not evidence of absence." properties: is_tor: { type: boolean } is_vpn: { type: boolean } is_proxy: { type: boolean } providers: type: array items: { type: string } IpLookupAbuse: type: object additionalProperties: false required: [email, phone, org] description: "Abuse-report contact from RIR bulk whois. Null outside registries publishing a free bulk dump — in practice not ARIN." properties: email: { type: string, nullable: true } phone: { type: string, nullable: true } org: { type: string, nullable: true } IpLookupRpki: type: object additionalProperties: false required: [status, authorized_asns] properties: status: type: string nullable: true enum: [valid, invalid, not-found, null] description: "'valid': a ROA authorises the observed origin at this prefix length. 'invalid': a ROA covers the prefix but authorises a different origin, or the announcement is more specific than max-length permits — the signature of a hijack or misconfiguration. 'not-found': no ROA covers the prefix (still most of the address space). null: the feature is off, or no origin ASN resolved." authorized_asns: type: array items: { type: integer } IpLookupRisk: type: object additionalProperties: false required: [score, reasons, level] description: "Transparent composite of the other signals — every point traceable to a named reason. NOT a calibrated fraud probability: this project holds bulk published data, not behavioural telemetry, so the score cannot be validated against outcomes. Treat as one input beside a specialist service, never as a verdict." properties: score: { type: integer, minimum: 0, maximum: 100 } reasons: type: array items: { type: string } level: type: string enum: [low, medium, high] IpLookupConnectionType: type: object additionalProperties: false required: [type, confidence, matched] description: "Heuristic guess at the access-network type from ASN name / rDNS text. There is no free authoritative source for this; null unless a pattern matched, never defaulted." properties: type: type: string enum: [cellular, dsl, cable, fiber, corporate, hosting, satellite] confidence: type: string enum: [heuristic] description: "Always 'heuristic' — present as a literal so the caveat survives into any consumer's schema." matched: { type: string, description: "The text the guess came from, so it can be argued with." } IpLookupUsageTypeFlags: type: object additionalProperties: false required: [hosting, residential, mobile, cdn, vpn, proxy] properties: hosting: { type: boolean } residential: { type: boolean } mobile: { type: boolean } cdn: { type: boolean } vpn: { type: boolean } proxy: { type: boolean } IpLookupThreat: type: object additionalProperties: false required: [is_malicious, sources, confidence] properties: is_malicious: { type: boolean } sources: type: array items: { type: string } confidence: type: number minimum: 0 maximum: 1 IpLookupSpecialPurpose: type: object additionalProperties: false required: [name, rfc, is_forwardable, is_globally_reachable] properties: name: type: string description: "e.g. 'Private-Use', 'Loopback', 'Documentation (TEST-NET-1)'." rfc: { type: string, nullable: true } is_forwardable: { type: boolean, nullable: true } is_globally_reachable: { type: boolean, nullable: true } IpLookupConfidence: type: object additionalProperties: false required: [overall, geo, network, asn, usage_type, threat] properties: overall: { type: number, minimum: 0, maximum: 1 } geo: { type: number, minimum: 0, maximum: 1, nullable: true } network: { type: number, minimum: 0, maximum: 1, nullable: true } asn: { type: number, minimum: 0, maximum: 1, nullable: true } usage_type: { type: number, minimum: 0, maximum: 1, nullable: true } threat: { type: number, minimum: 0, maximum: 1, nullable: true } IpLookupResult: type: object additionalProperties: false required: - ip - family - found - cached - latencyMs - geo - network - asn - cloud_provider - usage_type - usage_type_flags - anycast - flags - threat - confidence - reverse_dns - special_purpose - anonymity - abuse - rpki - risk - connection_type properties: ip: type: string family: type: integer enum: [4, 6] found: type: boolean cached: type: boolean latencyMs: type: number geo: $ref: "#/components/schemas/IpLookupGeo" network: $ref: "#/components/schemas/IpLookupNetwork" asn: $ref: "#/components/schemas/IpLookupAsn" cloud_provider: type: string nullable: true description: "Lowercased cloud provider tag (aws, gcp, azure, cloudflare, …) when the IP falls in a known cloud range." usage_type: type: string nullable: true enum: [residential, mobile, hosting, cdn, enterprise, vpn, proxy, null] usage_type_flags: $ref: "#/components/schemas/IpLookupUsageTypeFlags" anycast: type: boolean flags: type: array description: "Deduplicated, lowercased tag list (anycast, cloud:aws, threat:spamhaus_drop, …)" items: { type: string } threat: $ref: "#/components/schemas/IpLookupThreat" confidence: $ref: "#/components/schemas/IpLookupConfidence" reverse_dns: type: string nullable: true description: "PTR hostname for the IP, when one resolves. Best-effort DNS lookup, never blocks the response." special_purpose: allOf: - $ref: "#/components/schemas/IpLookupSpecialPurpose" nullable: true anonymity: $ref: "#/components/schemas/IpLookupAnonymity" abuse: allOf: - $ref: "#/components/schemas/IpLookupAbuse" nullable: true rpki: $ref: "#/components/schemas/IpLookupRpki" risk: allOf: - $ref: "#/components/schemas/IpLookupRisk" nullable: true connection_type: allOf: - $ref: "#/components/schemas/IpLookupConnectionType" nullable: true description: "Set when this address falls in an IANA special-purpose range (private/loopback/documentation/multicast/etc, RFC 6890) — these are never RIR-allocated, so 'network' above is legitimately empty for them. Null for an ordinary routable address, or when the 'special_purpose' lookup feature is disabled." AsnLookupResult: type: object additionalProperties: false required: [found, latencyMs] properties: found: type: boolean latencyMs: type: number asn: type: integer name: type: string nullable: true type: type: string nullable: true enum: [hosting, isp, mobile, enterprise, cdn, other, null] country: type: string nullable: true rir: type: string registeredDate: type: string nullable: true BulkLookupRequest: type: object additionalProperties: false required: [ips] properties: ips: type: array maxItems: 1000 items: type: string BulkLookupResponse: type: object additionalProperties: false required: [count, latencyMs, results] properties: count: type: integer latencyMs: type: number results: type: array items: $ref: "#/components/schemas/IpLookupResult" LookupCacheStats: type: object additionalProperties: false required: [size, hits, misses, hitRatio] properties: size: { type: integer } hits: { type: integer } misses: { type: integer } hitRatio: { type: number } ErrorResponse: type: object additionalProperties: false required: [error] properties: error: { type: string } CronSchedule: type: object additionalProperties: false required: [name, expression, enabled, lastRunAt, lastRunStatus, nextRunAt] properties: name: type: string enum: [collection, enrichment] expression: type: ["string", "null"] description: "node-cron expression (5 or 6 fields, UTC)" enabled: type: boolean lastRunAt: type: ["string", "null"] format: date-time lastRunStatus: type: ["string", "null"] enum: [success, error, skipped, null] nextRunAt: type: ["string", "null"] format: date-time CronScheduleInput: type: object additionalProperties: false properties: expression: type: ["string", "null"] description: "node-cron expression to set, or null to disable" CronTriggerResponse: type: object additionalProperties: false required: [triggered, name] properties: triggered: type: boolean name: type: string Settings: type: object additionalProperties: false description: Effective ip-insight.config.json settings — read-only, edit the file (or $IP_INSIGHT_CONFIG) and restart/rerun to change. required: [ sourcePath, collection, collectionStatuses, enrichment, batchSize, fetchRetryMaxAttempts, fetchRetryBaseDelayMs, fetchRetryTimeoutMs, exportFormat, exportDir, summaryDir, checkpointingEnabled, checkpointIdFormat, checkpointStaleAfterHours, checkpointAutoCleanupStaleJobs, maintenanceSchedulerEnabled, backupEnabled, backupIntervalHours, backupRetentionCount, backupDir, sleepModeEnabled, sleepModeIdleHours, lookupFeatures, cacheSize, cacheTtlMinutes, reverseDnsTimeoutMs, bulkLookupConcurrency, ] properties: sourcePath: type: ["string", "null"] collection: type: ["array", "null"] items: { type: string } collectionStatuses: type: ["array", "null"] items: { type: string } enrichment: type: ["array", "null"] items: { type: string } batchSize: { type: integer } fetchRetryMaxAttempts: { type: integer } fetchRetryBaseDelayMs: { type: integer } fetchRetryTimeoutMs: { type: integer } exportFormat: { type: string, enum: [csv, ndjson] } exportDir: { type: string } summaryDir: { type: string } checkpointingEnabled: { type: boolean } checkpointIdFormat: { type: string, enum: [uuid, sequential] } checkpointStaleAfterHours: { type: integer } checkpointAutoCleanupStaleJobs: { type: boolean } maintenanceSchedulerEnabled: { type: boolean } backupEnabled: { type: boolean } backupIntervalHours: { type: integer } backupRetentionCount: { type: integer } backupDir: { type: string } sleepModeEnabled: { type: boolean } sleepModeIdleHours: { type: integer } lookupFeatures: type: ["array", "null"] items: { type: string } cacheSize: { type: integer } cacheTtlMinutes: { type: integer } reverseDnsTimeoutMs: { type: integer } bulkLookupConcurrency: { type: integer } ResumableJob: type: object additionalProperties: false required: [id, displayId, startedAt, sourcesTotal, sourcesCompleted, stale] properties: id: { type: string } displayId: { type: string } startedAt: { type: string, format: date-time } sourcesTotal: { type: integer } sourcesCompleted: { type: integer } stale: { type: boolean } ResumeJobRequest: type: object additionalProperties: false properties: jobId: type: string description: uuid or display id (e.g. collect-000123); omit to resume the most recent non-stale interrupted job BackupRun: type: object additionalProperties: false required: [id, status, startedAt, endedAt, filePath, sizeBytes, errorMessage] properties: id: { type: string } status: { type: string, enum: [running, completed, failed] } startedAt: { type: string, format: date-time } endedAt: { type: ["string", "null"], format: date-time } filePath: { type: ["string", "null"] } sizeBytes: { type: ["integer", "null"] } errorMessage: { type: ["string", "null"] } RestoreBackupRequest: type: object additionalProperties: false required: [filePath, confirm] properties: filePath: type: string confirm: type: boolean description: must be true — a lightweight guard against an accidental restore call, mirroring the CLI's --yes flag DatabaseSummary: type: object additionalProperties: true description: >- Block/table counts by RIR, family, and status, plus last-run-per-source — same content as `ip-insight summary`. Loosely typed (additionalProperties) since it's a nested, evolving breakdown shown read-only in the panel.