API Documentation

Introduction

To access our API, simply append .json to the end of a page address. Only certain pages (and page tabs) have APIs assocoiated with them.

This document contains the following:

List of Pages Accessible Via API

Click on any example link below to access the API via your browser. Note that you can access your own private tournaments' data only if you are logged-in.

You may find it easier to change a private tournament to "Unlisted" temporarily so that you can access its data via script/curl without having to figure out how to "log-in" via script/curl.

Special API Pages

Javascript Example

To test this javascript code: open a new browser tab, open your browser's javascript console (e.g. F12 in Chrome or Firefox), paste this code into the console, and execute it. The result should be output to the console.

var getBMData = function(url) {
  var ajaxhttp = new XMLHttpRequest();

  ajaxhttp.open("GET", url, true);
  ajaxhttp.setRequestHeader("content-type", "text/plain"); // Avoid preflighted CORS request.
  ajaxhttp.onreadystatechange = function() {
    if (ajaxhttp.readyState == 4 && ajaxhttp.status == 200) {
       var jcontent = JSON.parse(ajaxhttp.responseText);
       console.log(jcontent);
    }
  }
  ajaxhttp.send(null);
}
var url = "http://www.burningmeter.com/t/1/demonstration-tournament/_all.json";
getBMData(url);

Tournament Match Info

Below are brief explanations of some of the quirks of the tournament match data format.

State Names

Known Errors and Solutions (Troubleshooting)