AS Path Length

This data call returns AS-path metrics (e.g. shortest or longest AS-path to other ASNs we are peering with) for the queried ASN.

https://stat.ripe.net/data/as-path-length/data.<format><?<parameters> 

e.g. https://stat.ripe.net/data/as-path-length/data.json?resource=AS3333

Parameters

KeyValueInfoRequired
resourceASAS number to queryYES
sort_by "number" (default), "count", "location", "geo" Sort by the given field. In the case of "geo", sort by approximating a world map on to a circle. NO

Output

Data

KeyInfo
stats List of RIS peers that have seen routes to the given AS. Each record has the following format:
   count: number of data points collected,
   location: human readable description of the RIS peer,
   number: unique RIS peer id,
   stripped: {   // stats that exclude AS path prepending
       avg: mean number of path entries, excluding the RIS peer itself,
       max: maximum number of path entries, excluding the RIS peer,
       min: minimum number of path entries, excluding the peer,
       sum: total number of path entries across all data points,
   },
   unstripped: {   // stats that include AS path prepending
       ... // same as for 'stripped',
   }
query_starttime/query_endtime Holds the time period the query covers.
In version 1.1 the result is based on a snapshot instead of a time period. For compatibility reasons "query_starttime" and "query_endtime" will be kept in version 1.x but will hold the same value.
resource Defines the resource used for the query

Example

    "data": {
        "query_endtime": "2012-04-04T12:03:00", 
        "query_starttime": "2012-04-20T12:03:00", 
        "resource": "3333",
        "stats": [
            {
                "count": 231, 
                "location": "RIPE-NCC Multihop, Amsterdam", 
                "number": 0, 
                "stripped": {
                    "avg": 4.796536796536796, 
                    "max": 7, 
                    "min": 3, 
                    "sum": 1108
                }, 
                "unstripped": {
                    "avg": 6.004329004329004, 
                    "max": 9, 
                    "min": 4, 
                    "sum": 1387
                }
            }, 
            ...
 ]

deprecated - 1.0

This version has been superceded by version 1.1 which is using a more reliable backend.

upcoming - 2.0

Difference to version 1.1: "query_endtime" & "query_starttime" have been replaced by "query_time"