Broker HTTP API

The BGPStream Broker is a web application that provides a unified query interface to retrieve meta-data about data available from different data providers. See the data providers page for up-to-date information about the data held by the broker (this page is dynamically generated using the broker metadata API described below).

CAIDA operates a publicly accessible instance of the Broker that libBGPStream is configured to query by default:

Public Broker URL https://broker.bgpstream.caida.org/v2

The Broker provides two query APIs: data and metadata. Metadata queries retrieve information about the Data Providers and Collectors that the broker knows about. Data queries on the other hand, retrieve information about data files known to the broker.

See the BGPStream paper for more details about how libBGPStream queries the broker.


Metadata API /meta

Data Provider Metadata /meta/projects/{project}

URL Parameters:

Parameter Description Type Values Default
{project} Optionally filter results to a single project String routeviews, ris all projects

GET Parameters:

Parameter Description Type Values Default
human Pretty-printed JSON output Boolean none false

Example Result https://broker.bgpstream.caida.org/v2/meta/projects/ris?human

{
  "time": 1569619193,
  "type": "meta",
  "error": null,
  "queryParameters": {
    "human": true,
    "project": "ris"
  },
  "data": {
    "projects": {
      "ris": {
        "collectors": {
          "rrc00": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "939513960",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "936355260",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc01": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "964687020",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "964623600",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc02": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "985398000",
                "latestDumpTime": "1222905540"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "985376400",
                "latestDumpTime": "1222920300"
              }
            }
          },
          "rrc03": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "979693560",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "979664760",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc04": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "988137720",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "988108920",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc05": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "992450100",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "992421300",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc06": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "999184080",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "999161580",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc07": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1017953460",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1017935460",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc08": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1020793980",
                "latestDumpTime": "1094112000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1020765180",
                "latestDumpTime": "1094137200"
              }
            }
          },
          "rrc09": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1052601300",
                "latestDumpTime": "1075910400"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1052570640",
                "latestDumpTime": "1075928340"
              }
            }
          },
          "rrc10": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1067644800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1067644800",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc11": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1076688000",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1076860800",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc12": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1089072000",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1089023700",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc13": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1119628800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1117807800",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc14": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1104537600",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1104537600",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc15": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1134576000",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1136284200",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc16": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1201852740",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1201824000",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc18": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1446652800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1446644400",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc19": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1453996800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1453974900",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc20": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1446652800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1446644400",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc21": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1446652800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1446644400",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc22": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1513900800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1515369600",
                "latestDumpTime": "1569618600"
              }
            }
          },
          "rrc23": {
            "project": "ris",
            "dataTypes": {
              "ribs": {
                "dumpPeriod": 28800,
                "dumpDuration": 120,
                "oldestDumpTime": "1513900800",
                "latestDumpTime": "1569600000"
              },
              "updates": {
                "dumpPeriod": 300,
                "dumpDuration": 300,
                "oldestDumpTime": "1515369600",
                "latestDumpTime": "1569618600"
              }
            }
          }
        }
      }
    }
  }
}

Collector Metadata /meta/collectors/{collector}

URL Parameters:

Parameter Description Type Values Default
{collector} Optionally filter results to a single collector String See data providers all collectors

GET Parameters:

Parameter Description Type Values Default
human Pretty-printed JSON output Boolean none false

Example Result https://broker.bgpstream.caida.org/v2/meta/collectors/route-views2?human

{
  "time": 1569619339,
  "type": "meta",
  "error": null,
  "queryParameters": {
    "human": true,
    "collector": "route-views2"
  },
  "data": {
    "collectors": {
      "route-views2": {
        "project": "routeviews",
        "dataTypes": {
          "ribs": {
            "dumpPeriod": 7200,
            "dumpDuration": 120,
            "oldestDumpTime": "1004114880",
            "latestDumpTime": "1569614400"
          },
          "updates": {
            "dumpPeriod": 900,
            "dumpDuration": 900,
            "oldestDumpTime": "1004102520",
            "latestDumpTime": "1569618000"
          }
        }
      }
    }
  }
}

Data API /data

GET Parameters:

Parameter Description Type Values Default
collector Collector to retrieve data for String See data providers all collectors
collectors List of collectors to retrieve data for Array See data providers all collectors
project Project to retrieve data for String See data providers all projects
projects List of projects to retrieve data for Array See data providers all projects
intervals List of time intervals Array {epoch-start},{epoch-end} required parameter
type Data type to retrieve String ribs, updates all types
types Data types to retrieve Array ribs, updates all types
resourceType Resource type to retrieve String stream, batch all resources
resourceTypes Resource types to retrieve Array stream, batch all resources
routers Filter resources by routers Array router IPs none
peer_asns Filter resources by peer AS numbers Array peer ASNs none
minInitialTime Start time of the current window Epoch seconds Should be set to maximum of (initialTime + duration) from previously returned results earliest interval start time
dataAddedSince Last request time Epoch seconds Should be set to the value of the time attribute in the previous result none
human Pretty-printed JSON output Boolean none false

Example Result
https://broker.bgpstream.caida.org/v2/data?human&intervals[]=1438819200,1438819200&collectors[]=route-views2&collectors[]=rrc03&types[]=updates

{
  "time": 1569619950,
  "type": "data",
  "error": null,
  "queryParameters": {
    "human": true,
    "projects": [],
    "project": null,
    "collectors": [
      "route-views2",
      "rrc03"
    ],
    "collector": null,
    "types": [
      "updates"
    ],
    "type": null,
    "resourceTypes": [],
    "resourceType": null,
    "minInitialTime": null,
    "dataAddedSince": null,
    "intervals": [
      "1438819200,1438819200"
    ],
    "debug": {
      "numResources": 4,
      "intervals": [
        "1438819200,1438819200"
      ]
    }
  },
  "data": {
    "resources": [
      {
        "url": "http:\/\/bgp-archive.caida.org\/routeviews\/route-views2\/updates\/2015\/08\/05\/routeviews.route-views2.updates.1438818300.bz2",
        "format": "mrt",
        "transport": "file",
        "project": "routeviews",
        "collector": "route-views2",
        "type": "updates",
        "initialTime": 1438818300,
        "duration": 900,
        "attr": []
      },
      {
        "url": "http:\/\/bgp-archive.caida.org\/ris\/rrc03\/updates\/2015\/08\/05\/ris.rrc03.updates.1438818900.gz",
        "format": "mrt",
        "transport": "file",
        "project": "ris",
        "collector": "rrc03",
        "type": "updates",
        "initialTime": 1438818900,
        "duration": 300,
        "attr": []
      },
      {
        "url": "http:\/\/bgp-archive.caida.org\/routeviews\/route-views2\/updates\/2015\/08\/06\/routeviews.route-views2.updates.1438819200.bz2",
        "format": "mrt",
        "transport": "file",
        "project": "routeviews",
        "collector": "route-views2",
        "type": "updates",
        "initialTime": 1438819200,
        "duration": 900,
        "attr": []
      },
      {
        "url": "http:\/\/bgp-archive.caida.org\/ris\/rrc03\/updates\/2015\/08\/06\/ris.rrc03.updates.1438819200.gz",
        "format": "mrt",
        "transport": "file",
        "project": "ris",
        "collector": "rrc03",
        "type": "updates",
        "initialTime": 1438819200,
        "duration": 300,
        "attr": []
      }
    ]
  }
}