internal/APIs.md
... ...
@@ -1,7 +1,50 @@
1 1
# Application Programming Interfaces (APIs)
2 2
This page can be useful if you are trying to automate something or if you are trying to retrieve data programmatically.
3 3
4
-### ASN Authentication Solution
4
+## What is my IP
5
+- whatsmyip:
6
+ - ipv4+ipv6: [myip.dn42](http://myip.dn42/)
7
+ - ipv4 only: [v4.myip.dn42](http://v4.myip.dn42/) or [172.20.0.81](http://172.20.0.81)
8
+ - ipv6 only: [v6.myip.dn42](http://v6.myip.dn42/) or [fd42:d42:d42:81::1](http://[fd42:d42:d42:81::1]/)
9
+ - Api endpoints:
10
+ - /raw: return your IP address as plain text
11
+ - /api: JSON with your IP plus the details of the server you reached (location, ASN, etc.)
12
+ - with geolocation provided by [DN42-Geoip](https://github.com/Xe-iu/dn42-geoip) and autonomous system info provided by [DN42-GeoASN](https://github.com/rdp-studio/dn42-geoasn): [myip.launchpadx.dn42](https://myip.launchpadx.dn42)
13
+ - Geolocation API
14
+ - API endpoints:
15
+ - IPv4: v4.myip.launchpadx.dn42
16
+ - IPv6: v6.myip.launchpadx.dn42
17
+ - Dual-stack: api.myip.launchpadx.dn42
18
+ - [API documentation](https://github.com/Xe-iu/dn42-geoip/blob/main/api/README.md)
19
+ - ASN API
20
+ - API endpoints:
21
+ - IPv4: asn4.myip.launchpadx.dn42
22
+ - IPv6: asn6.myip.launchpadx.dn42
23
+ - Dual-stack: asn.myip.launchpadx.dn42
24
+ - [whatismyip.dn42](http://whatismyip.dn42)
25
+ - API endpoint:
26
+ - IPv4: [http://ipv4.whatismyip.dn42:8080/ipinfo](http://ipv4.whatismyip.dn42:8080/ipinfo)
27
+ - IPv6: [http://ipv6.whatismyip.dn42:8080/ipinfo](http://ipv6.whatismyip.dn42:8080/ipinfo)
28
+
29
+
30
+## Other network-related
31
+
32
+- Cloudflare-like cdn-cgi/trace: [map.jerry.dn42/cdn-cgi/trace](https://map.jerry.dn42/cdn-cgi/trace)
33
+
34
+### Map.dn42 API Services
35
+
36
+Data refreshes whenever the collector provides a new MRT file, generally every 10-15 minutes.
37
+
38
+| API | URL | Description |
39
+| ------------------ | --- | ----------- |
40
+| `/map` | [https://map.dn42/map](https://map.dn42/map) <br> [https://api.iedon.com/dn42/map](https://api.iedon.com/dn42/map) | Raw binary map data, [See binary format](https://iedon.net/post/4) |
41
+| `/map?type=json` | [https://map.dn42/map?type=json](https://map.dn42/map?type=json) <br> [https://api.iedon.com/dn42/map?type=json](https://api.iedon.com/dn42/map?type=json) | Raw map data, in JSON |
42
+| `/asn/{asn}` | [https://map.dn42/asn/4242422189](https://map.dn42/asn/4242422189) <br> [https://api.iedon.com/dn42/asn/4242422189](https://api.iedon.com/dn42/asn/4242422189) | Real-time node information from the map, including WHOIS data, in JSON |
43
+| `/ranking` | [https://map.dn42/ranking](https://map.dn42/ranking) <br> [https://api.iedon.com/dn42/ranking](https://api.iedon.com/dn42/ranking) | DN42 Global Ranking, based on the map.dn42 index |
44
+| `/myip/[raw|api]` | [https://map.dn42/myip/](https://map.dn42/myip/) <br> [https://map.dn42/myip/api](https://map.dn42/myip/api) <br> [https://map.dn42/myip/raw](https://map.dn42/myip/raw) | What's My IP instance by map.dn42, including `netname` and `country` information if available |
45
+
46
+
47
+## ASN Authentication Solution
5 48
Authenticate your users by having them verify their ASN ownership with KIOUBIT-MNT using their registry-provided methods in an automated way. An example of this is the automatic peering system for the Kioubit Network.
6 49
[Documentation](https://dn42.g-load.eu/about/authentication-services/)
7 50