Update README.md
parent
962e4fe6b3
commit
aaab8fb5b2
42
README.md
42
README.md
|
@ -35,10 +35,52 @@ A Python library and client software is [available](https://github.com/D4-projec
|
||||||
|
|
||||||
# CURL Example
|
# CURL Example
|
||||||
|
|
||||||
|
## Get the ASN from an IP or a prefix
|
||||||
```bash
|
```bash
|
||||||
|
curl https://bgpranking-ng.circl.lu/ipasn_history/?ip=143.255.153.0/24
|
||||||
|
```
|
||||||
|
|
||||||
|
## Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"address_family": "v4",
|
||||||
|
"ip": "143.255.153.0/24",
|
||||||
|
"source": "caida"
|
||||||
|
},
|
||||||
|
"response": {
|
||||||
|
"2019-05-19T12:00:00": {
|
||||||
|
"asn": "264643",
|
||||||
|
"prefix": "143.255.153.0/24"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Get the ranking of the AS
|
||||||
|
```
|
||||||
curl -X POST -d '{"asn": "5577"}' https://bgpranking-ng.circl.lu/json/asn
|
curl -X POST -d '{"asn": "5577"}' https://bgpranking-ng.circl.lu/json/asn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"asn": "5577"
|
||||||
|
},
|
||||||
|
"response": {
|
||||||
|
"asn_description": "ROOT, LU",
|
||||||
|
"ranking": {
|
||||||
|
"rank": 0.0004720052083333333,
|
||||||
|
"position": 7084,
|
||||||
|
"total_known_asns": 15375
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
# Server Installation (if you want to run your own)
|
# Server Installation (if you want to run your own)
|
||||||
|
|
||||||
**IMPORTANT**: Use [pipenv](https://pipenv.readthedocs.io/en/latest/)
|
**IMPORTANT**: Use [pipenv](https://pipenv.readthedocs.io/en/latest/)
|
||||||
|
|
Loading…
Reference in New Issue