{
  "opencollection": "1.0.0",
  "info": {
    "name": "Eaton Smart Breaker API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "client_credentials",
      "accessTokenUrl": "https://api.em.eaton.com/oauth2/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Authorization",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Issue OAuth2 Bearer Token",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.em.eaton.com/oauth2/token",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "grant_type",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Exchange Client ID + secret (Base64-encoded as Basic auth) for a Bearer access token valid for 1 hour."
        }
      ]
    },
    {
      "info": {
        "name": "Organizations",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Organizations",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/organizations"
          },
          "docs": "List Organizations"
        },
        {
          "info": {
            "name": "Get Organization",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/organizations/:organizationId",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get Organization"
        }
      ]
    },
    {
      "info": {
        "name": "Locations",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Locations",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/locations",
            "params": [
              {
                "name": "organizationId",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "List Locations"
        },
        {
          "info": {
            "name": "Get Location",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/locations/:locationId",
            "params": [
              {
                "name": "locationId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get Location"
        }
      ]
    },
    {
      "info": {
        "name": "Devices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Devices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/devices",
            "params": [
              {
                "name": "locationId",
                "value": "",
                "type": "query"
              },
              {
                "name": "hardwareType",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "List devices, optionally filtered by location."
        },
        {
          "info": {
            "name": "Get Device",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/devices/:deviceId",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get Device"
        },
        {
          "info": {
            "name": "Decommission Device",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.em.eaton.com/api/v1/devices/:deviceId",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Decommission Device"
        },
        {
          "info": {
            "name": "Get Device State",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/devices/:deviceId/state",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get Device State"
        }
      ]
    },
    {
      "info": {
        "name": "Device Commands",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Send Device Command",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.em.eaton.com/api/v1/devices/:deviceId/commands",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Send an on/off/cycle command to a single device."
        },
        {
          "info": {
            "name": "Send Batch Device Commands",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.em.eaton.com/api/v1/deviceBatchCommands",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Send a single command to many devices in one request."
        }
      ]
    },
    {
      "info": {
        "name": "Energy Data",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get Device Energy Telemetry",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/devices/:deviceId/energy",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "start",
                "value": "",
                "type": "query"
              },
              {
                "name": "end",
                "value": "",
                "type": "query"
              },
              {
                "name": "interval",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Get Device Energy Telemetry"
        }
      ]
    },
    {
      "info": {
        "name": "Events",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Device Events",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/devices/:deviceId/events",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "List Device Events"
        }
      ]
    },
    {
      "info": {
        "name": "EV Only",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List EV Charging Sessions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/ev/:deviceId/sessions",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "List EV Charging Sessions"
        },
        {
          "info": {
            "name": "Get EV Charging Session",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.em.eaton.com/api/v1/ev/:deviceId/sessions/:sessionId",
            "params": [
              {
                "name": "deviceId",
                "value": "",
                "type": "path"
              },
              {
                "name": "sessionId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get EV Charging Session"
        }
      ]
    }
  ],
  "bundled": true
}