Make Metrics API calls

To make API calls, refer to the getting started repo. There are examples in node.js and python3 so that you can enter either subdirectory and run either npm install or pip -r install requirements.txt.

API Overview

There is a single endpoint used to access the metrics API. The api.py or api.js files contain a function that will streamline this call, and all other API scripts make use of this function to log the output of that request to the console. You will need a valid developer API key to access.

Example Response Payload

{
  artifact_detect: {
    channel1: 'blink',
    channel2: 'good',
    channel3: 'good',
    channel4: 'blink'
  },
  bandpower: {
    channel1: {
      '0': 20.88662778423314,
      '1': 47.681796906634396,
      '2': 52.49722928091861,
      '3': 80.58513408010214
    },
    channel2: {
      '0': 10.954671304955088,
      '1': 27.76331742324538,
      '2': 36.1206198231319,
      '3': 35.02804073557742
    },
    channel3: {
      '0': 38.02791333015509,
      '1': 85.29277913777635,
      '2': 83.80068133441219,
      '3': 156.39622267856817
    },
    channel4: {
      '0': 20.88662778423314,
      '1': 47.681796906634396,
      '2': 52.49722928091861,
      '3': 80.58513408010214
    }
  },
  blink: { blink: 'True' },
  eye: { eye: 'False' }
}

Last updated