diff --git a/frontend/src/lib/api/api.js b/frontend/src/lib/api/api.js index 75e4c165..f2d5010a 100644 --- a/frontend/src/lib/api/api.js +++ b/frontend/src/lib/api/api.js @@ -3340,6 +3340,16 @@ export class API { ); }, + /** + * Look up the autonomous systems that announce the given IP address. + * + * @param {string} ip + * @returns {Promise} + */ + lookupASN: async (ip) => { + return await getJSON(this.getPath(`/ipdata/asn/lookup?ip=${encodeURIComponent(ip)}`)); + }, + /** * Resolve configured ASN numbers to their details. ASNs absent from the * dataset are left out of the result so the UI can flag them. diff --git a/frontend/src/routes/tools/panels/ASN.svelte b/frontend/src/routes/tools/panels/ASN.svelte index 0db643f8..3eeb7e41 100644 --- a/frontend/src/routes/tools/panels/ASN.svelte +++ b/frontend/src/routes/tools/panels/ASN.svelte @@ -1,5 +1,6 @@