Petal Docs
  • Introduction
  • Connect to muse (Free)
    • Connect muse & Stream Raw Data
      • Connect muse to Mac
      • Connect muse to Windows
  • Receive Data Streams (Free)
    • Receive an LSL Stream
      • Python Examples
      • Node Examples
    • Receive an OSC Stream
      • Python Examples
      • Node Examples
    • Receive Webhooks
      • Python Examples
      • Node Examples
  • Log Data (Free)
    • Logging Data
  • Metrics API (Maker Plan)
    • API Integration
    • Make Metrics API calls
      • Python Examples
      • Node.js Examples
  • Receive Data Streams (Maker Plan)
    • Receive an LSL Stream
      • Python Examples
      • Node Examples
    • Receive an OSC Stream
      • Python Examples
      • Node Examples
    • Receive Webhooks
      • Python Examples
      • Node Examples
  • Glossary of Terms
    • Glossary of Terms
  • 🧪Markers
    • 🧪Markers User Guide
Powered by GitBook
On this page
  • API Overview
  • Example Response Payload

Was this helpful?

  1. Metrics API (Maker Plan)

Make Metrics API calls

PreviousAPI IntegrationNextPython Examples

Last updated 3 years ago

Was this helpful?

To make API calls, refer to the . 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 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' }
}
getting started repo
API key