{ "openapi": "3.0.1", "info": { "title": "Cisco Meraki Dashboard API \u2014 sensor", "description": "The sensor operations of the Cisco Meraki Dashboard API, split by product area from Cisco's published OpenAPI definition.", "version": "1.72.0", "contact": { "name": "Meraki Developer Community", "url": "https://meraki.io/community" }, "x-provenance": { "method": "harvested", "authored_by": "Cisco Meraki", "harvested_by": "API Evangelist", "harvested_on": "2026-07-31", "first_party": true, "note": "Split by first tag from Cisco's published spec3.json; operations unmodified.", "provider_published": true }, "x-evidence": [ { "type": "source", "url": "https://github.com/meraki/openapi/blob/master/openapi/spec3.json" }, { "type": "raw", "url": "https://raw.githubusercontent.com/meraki/openapi/master/openapi/spec3.json" }, { "type": "alternate", "url": "https://api.meraki.com/api/v1/openapiSpec" } ] }, "servers": [ { "url": "https://api.meraki.com/{basePath}", "variables": { "basePath": { "default": "api/v1" } } } ], "security": [ { "meraki_api_key": [] }, { "bearerAuth": [] } ], "tags": [ { "name": "alerts", "description": "" }, { "name": "byMetric", "description": "" }, { "name": "commands", "description": "" }, { "name": "configure", "description": "" }, { "name": "connections", "description": "" }, { "name": "current", "description": "" }, { "name": "gateways", "description": "" }, { "name": "history", "description": "" }, { "name": "latest", "description": "" }, { "name": "monitor", "description": "" }, { "name": "mqttBrokers", "description": "" }, { "name": "overview", "description": "" }, { "name": "profiles", "description": "" }, { "name": "readings", "description": "" }, { "name": "relationships", "description": "" }, { "name": "sensor", "description": "" } ], "components": { "securitySchemes": { "meraki_api_key": { "type": "apiKey", "name": "X-Cisco-Meraki-API-Key", "in": "header" }, "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "API Key" } } }, "paths": { "/devices/{serial}/sensor/commands": { "get": { "description": "Returns a historical log of all commands", "operationId": "getDeviceSensorCommands", "parameters": [ { "name": "serial", "in": "path", "description": "Serial", "schema": { "type": "string" }, "required": true }, { "name": "operations", "in": "query", "description": "Optional parameter to filter commands by operation. Allowed values are disableDownstreamPower, enableDownstreamPower, cycleDownstreamPower, and refreshData.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "perPage", "in": "query", "description": "The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10.", "schema": { "type": "integer" } }, { "name": "startingAfter", "in": "query", "description": "A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } }, { "name": "endingBefore", "in": "query", "description": "A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } }, { "name": "sortOrder", "in": "query", "description": "Sorted order of entries. Order options are 'ascending' and 'descending'. Default is 'descending'.", "schema": { "type": "string", "enum": [ "ascending", "descending" ] } }, { "name": "t0", "in": "query", "description": "The beginning of the timespan for the data. The maximum lookback period is 30 days from today.", "schema": { "type": "string" } }, { "name": "t1", "in": "query", "description": "The end of the timespan for the data. t1 can be a maximum of 30 days after t0.", "schema": { "type": "string" } }, { "name": "timespan", "in": "query", "description": "The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 30 days. The default is 30 days.", "schema": { "type": "number", "format": "float", "maximum": 2592000 } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "commandId": { "type": "string", "description": "ID to check the status of the command request" }, "createdAt": { "type": "string", "format": "date-time", "description": "Time when the command was triggered" }, "completedAt": { "type": "string", "format": "date-time", "description": "Time when the command was completed" }, "createdBy": { "type": "object", "properties": { "adminId": { "type": "string", "description": "ID of the admin" }, "name": { "type": "string", "description": "Name of the admin" }, "email": { "type": "string", "description": "Email of the admin" } }, "description": "Information about the admin who triggered the command" }, "operation": { "type": "string", "enum": [ "cycleDownstreamPower", "disableDownstreamPower", "enableDownstreamPower", "refreshData" ], "description": "Operation run on the sensor" }, "status": { "type": "string", "enum": [ "completed", "failed", "in_progress", "pending" ], "description": "Status of the command request" }, "errors": { "type": "array", "items": { "type": "string" }, "description": "Array of errors if failed" } } } }, "example": [ { "commandId": "1284392014819", "createdAt": "2018-02-11T00:00:00Z", "completedAt": "2018-05-12T00:00:00Z", "createdBy": { "adminId": "212406", "name": "Miles Meraki", "email": "miles@meraki.com" }, "operation": "disableDownstreamPower", "status": "completed", "errors": [] } ] } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "A comma-separated list of first, last, prev, and next relative links used for subsequent paginated requests." } } } }, "security": [ { "oauth2": [ "sensor:config:read" ] } ], "summary": "Returns a historical log of all commands", "tags": [ "sensor", "configure", "commands" ] }, "post": { "description": "Sends a command to a sensor", "operationId": "createDeviceSensorCommand", "parameters": [ { "name": "serial", "in": "path", "description": "Serial", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "operation": { "type": "string", "enum": [ "cycleDownstreamPower", "disableDownstreamPower", "enableDownstreamPower", "refreshData" ], "description": "Operation to run on the sensor. 'enableDownstreamPower', 'disableDownstreamPower', and 'cycleDownstreamPower' turn power on/off to the device that is connected downstream of an MT40 power monitor. 'refreshData' causes an MT15 or MT40 device to upload its latest readings so that they are immediately available in the Dashboard API." } }, "example": { "operation": "disableDownstreamPower" }, "required": [ "operation" ] } } }, "required": true }, "responses": { "201": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "commandId": { "type": "string", "description": "ID to check the status of the command request" }, "createdAt": { "type": "string", "format": "date-time", "description": "Time when the command was triggered" }, "completedAt": { "type": "string", "format": "date-time", "description": "Time when the command was completed" }, "createdBy": { "type": "object", "properties": { "adminId": { "type": "string", "description": "ID of the admin" }, "name": { "type": "string", "description": "Name of the admin" }, "email": { "type": "string", "description": "Email of the admin" } }, "description": "Information about the admin who triggered the command" }, "operation": { "type": "string", "enum": [ "cycleDownstreamPower", "disableDownstreamPower", "enableDownstreamPower", "refreshData" ], "description": "Operation run on the sensor" }, "status": { "type": "string", "enum": [ "completed", "failed", "in_progress", "pending" ], "description": "Status of the command request" }, "errors": { "type": "array", "items": { "type": "string" }, "description": "Array of errors if failed" } } }, "example": { "commandId": "1284392014819", "createdAt": "2018-02-11T00:00:00Z", "completedAt": "2018-05-12T00:00:00Z", "createdBy": { "adminId": "212406", "name": "Miles Meraki", "email": "miles@meraki.com" }, "operation": "disableDownstreamPower", "status": "completed", "errors": [] } } } } }, "security": [ { "oauth2": [ "sensor:config:write" ] } ], "summary": "Sends a command to a sensor", "tags": [ "sensor", "configure", "commands" ] } }, "/devices/{serial}/sensor/commands/{commandId}": { "get": { "description": "Returns information about the command's execution, including the status", "operationId": "getDeviceSensorCommand", "parameters": [ { "name": "serial", "in": "path", "description": "Serial", "schema": { "type": "string" }, "required": true }, { "name": "commandId", "in": "path", "description": "Command ID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "commandId": { "type": "string", "description": "ID to check the status of the command request" }, "createdAt": { "type": "string", "format": "date-time", "description": "Time when the command was triggered" }, "completedAt": { "type": "string", "format": "date-time", "description": "Time when the command was completed" }, "createdBy": { "type": "object", "properties": { "adminId": { "type": "string", "description": "ID of the admin" }, "name": { "type": "string", "description": "Name of the admin" }, "email": { "type": "string", "description": "Email of the admin" } }, "description": "Information about the admin who triggered the command" }, "operation": { "type": "string", "enum": [ "cycleDownstreamPower", "disableDownstreamPower", "enableDownstreamPower", "refreshData" ], "description": "Operation run on the sensor" }, "status": { "type": "string", "enum": [ "completed", "failed", "in_progress", "pending" ], "description": "Status of the command request" }, "errors": { "type": "array", "items": { "type": "string" }, "description": "Array of errors if failed" } } }, "example": { "commandId": "1284392014819", "createdAt": "2018-02-11T00:00:00Z", "completedAt": "2018-05-12T00:00:00Z", "createdBy": { "adminId": "212406", "name": "Miles Meraki", "email": "miles@meraki.com" }, "operation": "disableDownstreamPower", "status": "completed", "errors": [] } } } } }, "security": [ { "oauth2": [ "sensor:config:read" ] } ], "summary": "Returns information about the command's execution, including the status", "tags": [ "sensor", "configure", "commands" ] } }, "/devices/{serial}/sensor/relationships": { "get": { "description": "List the sensor roles for a given sensor or camera device.", "operationId": "getDeviceSensorRelationships", "parameters": [ { "name": "serial", "in": "path", "description": "Serial", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "livestream": { "type": "object", "properties": { "relatedDevices": { "type": "array", "items": { "type": "object", "properties": { "serial": { "type": "string", "description": "The serial of the related device" }, "productType": { "type": "string", "enum": [ "camera", "sensor" ], "description": "The product type of the related device" } } }, "description": "An array of the related devices for the role" } }, "description": "A role defined between an MT sensor and an MV camera that adds the camera's livestream to the sensor's details page. Snapshots from the camera will also appear in alert notifications that the sensor triggers." } } }, "example": { "livestream": { "relatedDevices": [ { "serial": "Q234-ABCD-5678", "productType": "camera" } ] } } } } } }, "security": [ { "oauth2": [ "sensor:config:read" ] } ], "summary": "List the sensor roles for a given sensor or camera device.", "tags": [ "sensor", "configure", "relationships" ] }, "put": { "description": "Assign one or more sensor roles to a given sensor or camera device.", "operationId": "updateDeviceSensorRelationships", "parameters": [ { "name": "serial", "in": "path", "description": "Serial", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "livestream": { "type": "object", "properties": { "relatedDevices": { "type": "array", "items": { "type": "object", "properties": { "serial": { "type": "string", "description": "The serial of the related device" } }, "required": [ "serial" ] }, "description": "An array of the related devices for the role" } }, "description": "A role defined between an MT sensor and an MV camera that adds the camera's livestream to the sensor's details page. Snapshots from the camera will also appear in alert notifications that the sensor triggers." } }, "example": {} } } }, "required": false }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "livestream": { "type": "object", "properties": { "relatedDevices": { "type": "array", "items": { "type": "object", "properties": { "serial": { "type": "string", "description": "The serial of the related device" }, "productType": { "type": "string", "enum": [ "camera", "sensor" ], "description": "The product type of the related device" } } }, "description": "An array of the related devices for the role" } }, "description": "A role defined between an MT sensor and an MV camera that adds the camera's livestream to the sensor's details page. Snapshots from the camera will also appear in alert notifications that the sensor triggers." } } }, "example": { "livestream": { "relatedDevices": [ { "serial": "Q234-ABCD-5678", "productType": "camera" } ] } } } } } }, "security": [ { "oauth2": [ "sensor:config:write" ] } ], "summary": "Assign one or more sensor roles to a given sensor or camera device.", "tags": [ "sensor", "configure", "relationships" ] } }, "/networks/{networkId}/sensor/alerts/current/overview/byMetric": { "get": { "description": "Return an overview of currently alerting sensors by metric", "operationId": "getNetworkSensorAlertsCurrentOverviewByMetric", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "supportedMetrics": { "type": "array", "items": { "type": "string", "enum": [ "apparentPower", "co2", "current", "door", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "temperature", "tvoc", "upstreamPower", "voltage", "water" ] }, "description": "List of metrics that are supported for alerts, based on available sensor devices in the network" }, "counts": { "type": "object", "properties": { "apparentPower": { "type": "integer", "description": "Number of sensors that are currently alerting due to apparent power readings" }, "co2": { "type": "integer", "description": "Number of sensors that are currently alerting due to CO2 readings" }, "current": { "type": "integer", "description": "Number of sensors that are currently alerting due to electrical current readings" }, "door": { "type": "integer", "description": "Number of sensors that are currently alerting due to an open door" }, "frequency": { "type": "integer", "description": "Number of sensors that are currently alerting due to frequency readings" }, "humidity": { "type": "integer", "description": "Number of sensors that are currently alerting due to humidity readings" }, "indoorAirQuality": { "type": "integer", "description": "Number of sensors that are currently alerting due to indoor air quality readings" }, "noise": { "type": "object", "properties": { "ambient": { "type": "integer", "description": "Number of sensors that are currently alerting due to ambient noise readings" } }, "description": "Object containing the number of sensors that are currently alerting due to noise readings" }, "pm25": { "type": "integer", "description": "Number of sensors that are currently alerting due to PM2.5 readings" }, "powerFactor": { "type": "integer", "description": "Number of sensors that are currently alerting due to power factor readings" }, "realPower": { "type": "integer", "description": "Number of sensors that are currently alerting due to real power readings" }, "temperature": { "type": "integer", "description": "Number of sensors that are currently alerting due to temperature readings" }, "tvoc": { "type": "integer", "description": "Number of sensors that are currently alerting due to TVOC readings" }, "upstreamPower": { "type": "integer", "description": "Number of sensors that are currently alerting due to an upstream power outage" }, "voltage": { "type": "integer", "description": "Number of sensors that are currently alerting due to voltage readings" }, "water": { "type": "integer", "description": "Number of sensors that are currently alerting due to the presence of water" } }, "description": "Counts of currently alerting sensors, aggregated by alerting metric" } } }, "example": { "supportedMetrics": [ "temperature", "humidity", "door" ], "counts": { "apparentPower": 0, "co2": 0, "current": 0, "door": 0, "frequency": 0, "humidity": 1, "indoorAirQuality": 0, "noise": { "ambient": 0 }, "pm25": 0, "powerFactor": 0, "realPower": 0, "temperature": 4, "tvoc": 0, "upstreamPower": 0, "voltage": 0, "water": 0 } } } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "Return an overview of currently alerting sensors by metric", "tags": [ "sensor", "monitor", "alerts", "current", "overview", "byMetric" ] } }, "/networks/{networkId}/sensor/alerts/overview/byMetric": { "get": { "description": "Return an overview of alert occurrences over a timespan, by metric", "operationId": "getNetworkSensorAlertsOverviewByMetric", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true }, { "name": "t0", "in": "query", "description": "The beginning of the timespan for the data. The maximum lookback period is 731 days from today.", "schema": { "type": "string" } }, { "name": "t1", "in": "query", "description": "The end of the timespan for the data. t1 can be a maximum of 366 days after t0.", "schema": { "type": "string" } }, { "name": "timespan", "in": "query", "description": "The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 366 days. The default is 7 days. If interval is provided, the timespan will be autocalculated.", "schema": { "type": "number", "format": "float", "maximum": 31622400 } }, { "name": "interval", "in": "query", "description": "The time interval in seconds for returned data. The valid intervals are: 900, 3600, 86400, 604800, 2629746. The default is 604800. Interval is calculated if time params are provided.", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "startTs": { "type": "string", "format": "date-time", "description": "Start of the timespan over which sensor alerts are counted" }, "endTs": { "type": "string", "format": "date-time", "description": "End of the timespan over which sensor alerts are counted" }, "counts": { "type": "object", "properties": { "apparentPower": { "type": "integer", "description": "Number of sensor alerts that occurred due to apparent power readings" }, "co2": { "type": "integer", "description": "Number of sensors that are currently alerting due to CO2 readings" }, "current": { "type": "integer", "description": "Number of sensor alerts that occurred due to electrical current readings" }, "door": { "type": "integer", "description": "Number of sensor alerts that occurred due to an open door" }, "frequency": { "type": "integer", "description": "Number of sensor alerts that occurred due to frequency readings" }, "humidity": { "type": "integer", "description": "Number of sensor alerts that occurred due to humidity readings" }, "indoorAirQuality": { "type": "integer", "description": "Number of sensor alerts that occurred due to indoor air quality readings" }, "noise": { "type": "object", "properties": { "ambient": { "type": "integer", "description": "Number of sensor alerts that occurred due to ambient noise readings" } }, "description": "Object containing the number of sensor alerts that occurred due to noise readings" }, "pm25": { "type": "integer", "description": "Number of sensor alerts that occurred due to PM2.5 readings" }, "powerFactor": { "type": "integer", "description": "Number of sensor alerts that occurred due to power factor readings" }, "realPower": { "type": "integer", "description": "Number of sensor alerts that occurred due to real power readings" }, "temperature": { "type": "integer", "description": "Number of sensor alerts that occurred due to temperature readings" }, "tvoc": { "type": "integer", "description": "Number of sensor alerts that occurred due to TVOC readings" }, "upstreamPower": { "type": "integer", "description": "Number of sensor alerts that occurred due to upstream power outages" }, "voltage": { "type": "integer", "description": "Number of sensor alerts that occurred due to voltage readings" }, "water": { "type": "integer", "description": "Number of sensor alerts that occurred due to the presence of water" } }, "description": "Counts of sensor alerts over the timespan, by reading metric" } } } }, "example": [ { "startTs": "2022-08-21T00:00:00Z", "endTs": "2022-08-27T23:59:59Z", "counts": { "apparentPower": 0, "co2": 0, "current": 0, "door": 0, "frequency": 1, "humidity": 1, "indoorAirQuality": 0, "noise": { "ambient": 2 }, "pm25": 0, "powerFactor": 0, "realPower": 0, "temperature": 4, "tvoc": 0, "upstreamPower": 0, "voltage": 0, "water": 0 } } ] } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "Return an overview of alert occurrences over a timespan, by metric", "tags": [ "sensor", "monitor", "alerts", "overview", "byMetric" ] } }, "/networks/{networkId}/sensor/alerts/profiles": { "get": { "description": "Lists all sensor alert profiles for a network.", "operationId": "getNetworkSensorAlertsProfiles", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "profileId": { "type": "string", "description": "ID of the sensor alert profile." }, "name": { "type": "string", "description": "Name of the sensor alert profile." }, "schedule": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the sensor schedule to use with the alert profile. If not defined, the alert profile will be active at all times." }, "name": { "type": "string", "description": "Name of the sensor schedule to use with the alert profile." } }, "description": "The sensor schedule to use with the alert profile." }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "metric": { "type": "string", "enum": [ "apparentPower", "co2", "current", "door", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "temperature", "tvoc", "upstreamPower", "voltage", "water" ], "description": "The type of sensor metric that will be monitored for changes." }, "threshold": { "type": "object", "properties": { "temperature": { "type": "object", "properties": { "celsius": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Celsius." }, "fahrenheit": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Fahrenheit." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative temperature level." } }, "description": "Temperature threshold. One of 'celsius', 'fahrenheit', or 'quality' must be provided." }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Alerting threshold in %RH." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative humidity level." } }, "description": "Humidity threshold. One of 'relativePercentage' or 'quality' must be provided." }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "Alerting threshold for a water detection event. Must be set to true." } }, "required": [ "present" ], "description": "Water detection threshold. 'present' must be provided and set to true." }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "Alerting threshold for a door open event. Must be set to true." } }, "required": [ "open" ], "description": "Door open threshold. 'open' must be provided and set to true." }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as TVOC micrograms per cubic meter." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative TVOC level." } }, "description": "TVOC concentration threshold. One of 'concentration' or 'quality' must be provided." }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as CO2 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative CO2 level." } }, "description": "CO2 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as PM2.5 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative PM2.5 level." } }, "description": "PM2.5 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Alerting threshold as adjusted decibels." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative ambient noise level." } }, "description": "Ambient noise threshold. One of 'level' or 'quality' must be provided." } }, "required": [ "ambient" ], "description": "Noise threshold. 'ambient' must be provided." }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Alerting threshold as indoor air quality score." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative indoor air quality level." } }, "description": "Indoor air quality score threshold. One of 'score' or 'quality' must be provided." }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in watts. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Real power threshold. 'draw' must be provided." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in volt-amps. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Apparent power threshold. 'draw' must be provided." }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Alerting threshold as the ratio of active power to apparent power. Must be between 0 and 100." } }, "required": [ "percentage" ], "description": "Power factor threshold. 'percentage' must be provided." }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in amps. Must be between 0 and 15." } }, "required": [ "draw" ], "description": "Electrical current threshold. 'level' must be provided." }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in volts. Must be between 0 and 250." } }, "required": [ "level" ], "description": "Voltage threshold. 'level' must be provided." }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in hertz. Must be between 0 and 60." } }, "required": [ "level" ], "description": "Electrical frequency threshold. 'level' must be provided." }, "upstreamPower": { "type": "object", "properties": { "outageDetected": { "type": "boolean", "description": "Alerting threshold for an upstream power event. Must be set to true." } }, "required": [ "outageDetected" ], "description": "Upstream power threshold. 'outageDetected' must be provided and set to true." } }, "description": "Threshold for sensor readings that will cause an alert to be sent. This object should contain a single property key matching the condition's 'metric' value." }, "direction": { "type": "string", "enum": [ "above", "below" ], "description": "If 'above', an alert will be sent when a sensor reads above the threshold. If 'below', an alert will be sent when a sensor reads below the threshold. Only applicable for temperature, humidity, realPower, apparentPower, powerFactor, voltage, current, and frequency thresholds." }, "duration": { "type": "integer", "enum": [ 0, 60, 120, 180, 240, 300, 600, 900, 1800, 3600, 5400, 7200, 14400, 28800 ], "description": "Length of time in seconds that the triggering state must persist before an alert is sent. Available options are 0 seconds, 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 1 hour and 30 minutes, 2 hours, 4 hours, and 8 hours. Default is 0.", "default": 0 } }, "required": [ "metric", "threshold" ] }, "description": "List of conditions that will cause the profile to send an alert." }, "recipients": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "A list of emails that will receive information about the alert." }, "smsNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of SMS numbers that will receive information about the alert." }, "httpServerIds": { "type": "array", "items": { "type": "string" }, "description": "A list of webhook endpoint IDs that will receive information about the alert." } }, "description": "List of recipients that will receive the alert." }, "serials": { "type": "array", "items": { "type": "string" }, "description": "List of device serials assigned to this sensor alert profile." }, "includeSensorUrl": { "type": "boolean", "description": "Include dashboard link to sensor in messages (default: true)." }, "message": { "type": "string", "description": "A custom message that will appear in email and text message alerts." } }, "required": [ "conditions" ] } }, "example": [ { "profileId": "1", "name": "My Sensor Alert Profile", "schedule": { "id": "5", "name": "My Schedule" }, "conditions": [ { "metric": "temperature", "threshold": { "temperature": { "celsius": 20.5, "fahrenheit": 70.0, "quality": "good" }, "humidity": { "relativePercentage": 65, "quality": "inadequate" }, "water": { "present": true }, "door": { "open": true }, "tvoc": { "concentration": 400, "quality": "poor" }, "co2": { "concentration": 400, "quality": "poor" }, "pm25": { "concentration": 90, "quality": "fair" }, "noise": { "ambient": { "level": 120, "quality": "poor" } }, "indoorAirQuality": { "score": 80, "quality": "fair" }, "realPower": { "draw": 14.1 }, "apparentPower": { "draw": 17.2 }, "powerFactor": { "percentage": 81 }, "current": { "draw": 0.14 }, "voltage": { "level": 119.5 }, "frequency": { "level": 58.8 }, "upstreamPower": { "outageDetected": true } }, "direction": "above", "duration": 60 } ], "recipients": { "emails": [ "miles@meraki.com" ], "smsNumbers": [ "+15555555555" ], "httpServerIds": [ "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=" ] }, "serials": [ "Q234-ABCD-0001", "Q234-ABCD-0002", "Q234-ABCD-0003" ], "includeSensorUrl": true, "message": "Check with Miles on what to do." } ] } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "Lists all sensor alert profiles for a network.", "tags": [ "sensor", "configure", "alerts", "profiles" ] }, "post": { "description": "Creates a sensor alert profile for a network.", "operationId": "createNetworkSensorAlertsProfile", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the sensor alert profile." }, "schedule": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the sensor schedule to use with the alert profile. If not defined, the alert profile will be active at all times.", "nullable": true } }, "description": "The sensor schedule to use with the alert profile." }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "metric": { "type": "string", "enum": [ "apparentPower", "co2", "current", "door", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "temperature", "tvoc", "upstreamPower", "voltage", "water" ], "description": "The type of sensor metric that will be monitored for changes." }, "threshold": { "type": "object", "properties": { "temperature": { "type": "object", "properties": { "celsius": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Celsius." }, "fahrenheit": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Fahrenheit." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative temperature level." } }, "description": "Temperature threshold. One of 'celsius', 'fahrenheit', or 'quality' must be provided." }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Alerting threshold in %RH." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative humidity level." } }, "description": "Humidity threshold. One of 'relativePercentage' or 'quality' must be provided." }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "Alerting threshold for a water detection event. Must be set to true." } }, "required": [ "present" ], "description": "Water detection threshold. 'present' must be provided and set to true." }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "Alerting threshold for a door open event. Must be set to true." } }, "required": [ "open" ], "description": "Door open threshold. 'open' must be provided and set to true." }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as TVOC micrograms per cubic meter." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative TVOC level." } }, "description": "TVOC concentration threshold. One of 'concentration' or 'quality' must be provided." }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as CO2 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative CO2 level." } }, "description": "CO2 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as PM2.5 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative PM2.5 level." } }, "description": "PM2.5 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Alerting threshold as adjusted decibels." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative ambient noise level." } }, "description": "Ambient noise threshold. One of 'level' or 'quality' must be provided." } }, "required": [ "ambient" ], "description": "Noise threshold. 'ambient' must be provided." }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Alerting threshold as indoor air quality score." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative indoor air quality level." } }, "description": "Indoor air quality score threshold. One of 'score' or 'quality' must be provided." }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in watts. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Real power threshold. 'draw' must be provided." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in volt-amps. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Apparent power threshold. 'draw' must be provided." }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Alerting threshold as the ratio of active power to apparent power. Must be between 0 and 100." } }, "required": [ "percentage" ], "description": "Power factor threshold. 'percentage' must be provided." }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in amps. Must be between 0 and 15." } }, "required": [ "draw" ], "description": "Electrical current threshold. 'level' must be provided." }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in volts. Must be between 0 and 250." } }, "required": [ "level" ], "description": "Voltage threshold. 'level' must be provided." }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in hertz. Must be between 0 and 60." } }, "required": [ "level" ], "description": "Electrical frequency threshold. 'level' must be provided." }, "upstreamPower": { "type": "object", "properties": { "outageDetected": { "type": "boolean", "description": "Alerting threshold for an upstream power event. Must be set to true." } }, "required": [ "outageDetected" ], "description": "Upstream power threshold. 'outageDetected' must be provided and set to true." } }, "description": "Threshold for sensor readings that will cause an alert to be sent. This object should contain a single property key matching the condition's 'metric' value." }, "direction": { "type": "string", "enum": [ "above", "below" ], "description": "If 'above', an alert will be sent when a sensor reads above the threshold. If 'below', an alert will be sent when a sensor reads below the threshold. Only applicable for temperature, humidity, realPower, apparentPower, powerFactor, voltage, current, and frequency thresholds." }, "duration": { "type": "integer", "enum": [ 0, 60, 120, 180, 240, 300, 600, 900, 1800, 3600, 5400, 7200, 14400, 28800 ], "description": "Length of time in seconds that the triggering state must persist before an alert is sent. Available options are 0 seconds, 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 1 hour and 30 minutes, 2 hours, 4 hours, and 8 hours. Default is 0.", "default": 0 } }, "required": [ "metric", "threshold" ] }, "description": "List of conditions that will cause the profile to send an alert." }, "recipients": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "A list of emails that will receive information about the alert." }, "smsNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of SMS numbers that will receive information about the alert." }, "httpServerIds": { "type": "array", "items": { "type": "string" }, "description": "A list of webhook endpoint IDs that will receive information about the alert." } }, "description": "List of recipients that will receive the alert." }, "serials": { "type": "array", "items": { "type": "string" }, "description": "List of device serials assigned to this sensor alert profile." }, "includeSensorUrl": { "type": "boolean", "description": "Include dashboard link to sensor in messages (default: true).", "default": true }, "message": { "type": "string", "nullable": true, "description": "A custom message that will appear in email and text message alerts." } }, "example": { "name": "My Sensor Alert Profile", "schedule": { "id": "5" }, "conditions": [ { "metric": "temperature", "threshold": { "temperature": { "celsius": 20.5, "fahrenheit": 70.0, "quality": "good" }, "humidity": { "relativePercentage": 65, "quality": "inadequate" }, "water": { "present": true }, "door": { "open": true }, "tvoc": { "concentration": 400, "quality": "poor" }, "co2": { "concentration": 400, "quality": "poor" }, "pm25": { "concentration": 90, "quality": "fair" }, "noise": { "ambient": { "level": 120, "quality": "poor" } }, "indoorAirQuality": { "score": 80, "quality": "fair" }, "realPower": { "draw": 14.1 }, "apparentPower": { "draw": 17.2 }, "powerFactor": { "percentage": 81 }, "current": { "draw": 0.14 }, "voltage": { "level": 119.5 }, "frequency": { "level": 58.8 }, "upstreamPower": { "outageDetected": true } }, "direction": "above", "duration": 60 } ], "recipients": { "emails": [ "miles@meraki.com" ], "smsNumbers": [ "+15555555555" ], "httpServerIds": [ "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=" ] }, "serials": [ "Q234-ABCD-0001", "Q234-ABCD-0002", "Q234-ABCD-0003" ], "includeSensorUrl": true, "message": "Check with Miles on what to do." }, "required": [ "name", "conditions" ] } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "profileId": { "type": "string", "description": "ID of the sensor alert profile." }, "name": { "type": "string", "description": "Name of the sensor alert profile." }, "schedule": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the sensor schedule to use with the alert profile. If not defined, the alert profile will be active at all times." }, "name": { "type": "string", "description": "Name of the sensor schedule to use with the alert profile." } }, "description": "The sensor schedule to use with the alert profile." }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "metric": { "type": "string", "enum": [ "apparentPower", "co2", "current", "door", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "temperature", "tvoc", "upstreamPower", "voltage", "water" ], "description": "The type of sensor metric that will be monitored for changes." }, "threshold": { "type": "object", "properties": { "temperature": { "type": "object", "properties": { "celsius": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Celsius." }, "fahrenheit": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Fahrenheit." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative temperature level." } }, "description": "Temperature threshold. One of 'celsius', 'fahrenheit', or 'quality' must be provided." }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Alerting threshold in %RH." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative humidity level." } }, "description": "Humidity threshold. One of 'relativePercentage' or 'quality' must be provided." }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "Alerting threshold for a water detection event. Must be set to true." } }, "required": [ "present" ], "description": "Water detection threshold. 'present' must be provided and set to true." }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "Alerting threshold for a door open event. Must be set to true." } }, "required": [ "open" ], "description": "Door open threshold. 'open' must be provided and set to true." }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as TVOC micrograms per cubic meter." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative TVOC level." } }, "description": "TVOC concentration threshold. One of 'concentration' or 'quality' must be provided." }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as CO2 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative CO2 level." } }, "description": "CO2 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as PM2.5 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative PM2.5 level." } }, "description": "PM2.5 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Alerting threshold as adjusted decibels." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative ambient noise level." } }, "description": "Ambient noise threshold. One of 'level' or 'quality' must be provided." } }, "required": [ "ambient" ], "description": "Noise threshold. 'ambient' must be provided." }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Alerting threshold as indoor air quality score." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative indoor air quality level." } }, "description": "Indoor air quality score threshold. One of 'score' or 'quality' must be provided." }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in watts. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Real power threshold. 'draw' must be provided." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in volt-amps. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Apparent power threshold. 'draw' must be provided." }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Alerting threshold as the ratio of active power to apparent power. Must be between 0 and 100." } }, "required": [ "percentage" ], "description": "Power factor threshold. 'percentage' must be provided." }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in amps. Must be between 0 and 15." } }, "required": [ "draw" ], "description": "Electrical current threshold. 'level' must be provided." }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in volts. Must be between 0 and 250." } }, "required": [ "level" ], "description": "Voltage threshold. 'level' must be provided." }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in hertz. Must be between 0 and 60." } }, "required": [ "level" ], "description": "Electrical frequency threshold. 'level' must be provided." }, "upstreamPower": { "type": "object", "properties": { "outageDetected": { "type": "boolean", "description": "Alerting threshold for an upstream power event. Must be set to true." } }, "required": [ "outageDetected" ], "description": "Upstream power threshold. 'outageDetected' must be provided and set to true." } }, "description": "Threshold for sensor readings that will cause an alert to be sent. This object should contain a single property key matching the condition's 'metric' value." }, "direction": { "type": "string", "enum": [ "above", "below" ], "description": "If 'above', an alert will be sent when a sensor reads above the threshold. If 'below', an alert will be sent when a sensor reads below the threshold. Only applicable for temperature, humidity, realPower, apparentPower, powerFactor, voltage, current, and frequency thresholds." }, "duration": { "type": "integer", "enum": [ 0, 60, 120, 180, 240, 300, 600, 900, 1800, 3600, 5400, 7200, 14400, 28800 ], "description": "Length of time in seconds that the triggering state must persist before an alert is sent. Available options are 0 seconds, 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 1 hour and 30 minutes, 2 hours, 4 hours, and 8 hours. Default is 0.", "default": 0 } }, "required": [ "metric", "threshold" ] }, "description": "List of conditions that will cause the profile to send an alert." }, "recipients": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "A list of emails that will receive information about the alert." }, "smsNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of SMS numbers that will receive information about the alert." }, "httpServerIds": { "type": "array", "items": { "type": "string" }, "description": "A list of webhook endpoint IDs that will receive information about the alert." } }, "description": "List of recipients that will receive the alert." }, "serials": { "type": "array", "items": { "type": "string" }, "description": "List of device serials assigned to this sensor alert profile." }, "includeSensorUrl": { "type": "boolean", "description": "Include dashboard link to sensor in messages (default: true)." }, "message": { "type": "string", "description": "A custom message that will appear in email and text message alerts." } }, "required": [ "conditions" ] }, "example": { "profileId": "1", "name": "My Sensor Alert Profile", "schedule": { "id": "5", "name": "My Schedule" }, "conditions": [ { "metric": "temperature", "threshold": { "temperature": { "celsius": 20.5, "fahrenheit": 70.0, "quality": "good" }, "humidity": { "relativePercentage": 65, "quality": "inadequate" }, "water": { "present": true }, "door": { "open": true }, "tvoc": { "concentration": 400, "quality": "poor" }, "co2": { "concentration": 400, "quality": "poor" }, "pm25": { "concentration": 90, "quality": "fair" }, "noise": { "ambient": { "level": 120, "quality": "poor" } }, "indoorAirQuality": { "score": 80, "quality": "fair" }, "realPower": { "draw": 14.1 }, "apparentPower": { "draw": 17.2 }, "powerFactor": { "percentage": 81 }, "current": { "draw": 0.14 }, "voltage": { "level": 119.5 }, "frequency": { "level": 58.8 }, "upstreamPower": { "outageDetected": true } }, "direction": "above", "duration": 60 } ], "recipients": { "emails": [ "miles@meraki.com" ], "smsNumbers": [ "+15555555555" ], "httpServerIds": [ "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=" ] }, "serials": [ "Q234-ABCD-0001", "Q234-ABCD-0002", "Q234-ABCD-0003" ], "includeSensorUrl": true, "message": "Check with Miles on what to do." } } } } }, "security": [ { "oauth2": [ "sensor:telemetry:write" ] } ], "summary": "Creates a sensor alert profile for a network.", "tags": [ "sensor", "configure", "alerts", "profiles" ] } }, "/networks/{networkId}/sensor/alerts/profiles/{id}": { "get": { "description": "Show details of a sensor alert profile for a network.", "operationId": "getNetworkSensorAlertsProfile", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true }, { "name": "id", "in": "path", "description": "ID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "profileId": { "type": "string", "description": "ID of the sensor alert profile." }, "name": { "type": "string", "description": "Name of the sensor alert profile." }, "schedule": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the sensor schedule to use with the alert profile. If not defined, the alert profile will be active at all times." }, "name": { "type": "string", "description": "Name of the sensor schedule to use with the alert profile." } }, "description": "The sensor schedule to use with the alert profile." }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "metric": { "type": "string", "enum": [ "apparentPower", "co2", "current", "door", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "temperature", "tvoc", "upstreamPower", "voltage", "water" ], "description": "The type of sensor metric that will be monitored for changes." }, "threshold": { "type": "object", "properties": { "temperature": { "type": "object", "properties": { "celsius": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Celsius." }, "fahrenheit": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Fahrenheit." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative temperature level." } }, "description": "Temperature threshold. One of 'celsius', 'fahrenheit', or 'quality' must be provided." }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Alerting threshold in %RH." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative humidity level." } }, "description": "Humidity threshold. One of 'relativePercentage' or 'quality' must be provided." }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "Alerting threshold for a water detection event. Must be set to true." } }, "required": [ "present" ], "description": "Water detection threshold. 'present' must be provided and set to true." }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "Alerting threshold for a door open event. Must be set to true." } }, "required": [ "open" ], "description": "Door open threshold. 'open' must be provided and set to true." }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as TVOC micrograms per cubic meter." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative TVOC level." } }, "description": "TVOC concentration threshold. One of 'concentration' or 'quality' must be provided." }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as CO2 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative CO2 level." } }, "description": "CO2 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as PM2.5 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative PM2.5 level." } }, "description": "PM2.5 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Alerting threshold as adjusted decibels." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative ambient noise level." } }, "description": "Ambient noise threshold. One of 'level' or 'quality' must be provided." } }, "required": [ "ambient" ], "description": "Noise threshold. 'ambient' must be provided." }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Alerting threshold as indoor air quality score." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative indoor air quality level." } }, "description": "Indoor air quality score threshold. One of 'score' or 'quality' must be provided." }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in watts. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Real power threshold. 'draw' must be provided." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in volt-amps. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Apparent power threshold. 'draw' must be provided." }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Alerting threshold as the ratio of active power to apparent power. Must be between 0 and 100." } }, "required": [ "percentage" ], "description": "Power factor threshold. 'percentage' must be provided." }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in amps. Must be between 0 and 15." } }, "required": [ "draw" ], "description": "Electrical current threshold. 'level' must be provided." }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in volts. Must be between 0 and 250." } }, "required": [ "level" ], "description": "Voltage threshold. 'level' must be provided." }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in hertz. Must be between 0 and 60." } }, "required": [ "level" ], "description": "Electrical frequency threshold. 'level' must be provided." }, "upstreamPower": { "type": "object", "properties": { "outageDetected": { "type": "boolean", "description": "Alerting threshold for an upstream power event. Must be set to true." } }, "required": [ "outageDetected" ], "description": "Upstream power threshold. 'outageDetected' must be provided and set to true." } }, "description": "Threshold for sensor readings that will cause an alert to be sent. This object should contain a single property key matching the condition's 'metric' value." }, "direction": { "type": "string", "enum": [ "above", "below" ], "description": "If 'above', an alert will be sent when a sensor reads above the threshold. If 'below', an alert will be sent when a sensor reads below the threshold. Only applicable for temperature, humidity, realPower, apparentPower, powerFactor, voltage, current, and frequency thresholds." }, "duration": { "type": "integer", "enum": [ 0, 60, 120, 180, 240, 300, 600, 900, 1800, 3600, 5400, 7200, 14400, 28800 ], "description": "Length of time in seconds that the triggering state must persist before an alert is sent. Available options are 0 seconds, 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 1 hour and 30 minutes, 2 hours, 4 hours, and 8 hours. Default is 0.", "default": 0 } }, "required": [ "metric", "threshold" ] }, "description": "List of conditions that will cause the profile to send an alert." }, "recipients": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "A list of emails that will receive information about the alert." }, "smsNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of SMS numbers that will receive information about the alert." }, "httpServerIds": { "type": "array", "items": { "type": "string" }, "description": "A list of webhook endpoint IDs that will receive information about the alert." } }, "description": "List of recipients that will receive the alert." }, "serials": { "type": "array", "items": { "type": "string" }, "description": "List of device serials assigned to this sensor alert profile." }, "includeSensorUrl": { "type": "boolean", "description": "Include dashboard link to sensor in messages (default: true)." }, "message": { "type": "string", "description": "A custom message that will appear in email and text message alerts." } }, "required": [ "conditions" ] }, "example": { "profileId": "1", "name": "My Sensor Alert Profile", "schedule": { "id": "5", "name": "My Schedule" }, "conditions": [ { "metric": "temperature", "threshold": { "temperature": { "celsius": 20.5, "fahrenheit": 70.0, "quality": "good" }, "humidity": { "relativePercentage": 65, "quality": "inadequate" }, "water": { "present": true }, "door": { "open": true }, "tvoc": { "concentration": 400, "quality": "poor" }, "co2": { "concentration": 400, "quality": "poor" }, "pm25": { "concentration": 90, "quality": "fair" }, "noise": { "ambient": { "level": 120, "quality": "poor" } }, "indoorAirQuality": { "score": 80, "quality": "fair" }, "realPower": { "draw": 14.1 }, "apparentPower": { "draw": 17.2 }, "powerFactor": { "percentage": 81 }, "current": { "draw": 0.14 }, "voltage": { "level": 119.5 }, "frequency": { "level": 58.8 }, "upstreamPower": { "outageDetected": true } }, "direction": "above", "duration": 60 } ], "recipients": { "emails": [ "miles@meraki.com" ], "smsNumbers": [ "+15555555555" ], "httpServerIds": [ "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=" ] }, "serials": [ "Q234-ABCD-0001", "Q234-ABCD-0002", "Q234-ABCD-0003" ], "includeSensorUrl": true, "message": "Check with Miles on what to do." } } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "Show details of a sensor alert profile for a network.", "tags": [ "sensor", "configure", "alerts", "profiles" ] }, "put": { "description": "Updates a sensor alert profile for a network.", "operationId": "updateNetworkSensorAlertsProfile", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true }, { "name": "id", "in": "path", "description": "ID", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the sensor alert profile." }, "schedule": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the sensor schedule to use with the alert profile. If not defined, the alert profile will be active at all times.", "nullable": true } }, "description": "The sensor schedule to use with the alert profile." }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "metric": { "type": "string", "enum": [ "apparentPower", "co2", "current", "door", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "temperature", "tvoc", "upstreamPower", "voltage", "water" ], "description": "The type of sensor metric that will be monitored for changes." }, "threshold": { "type": "object", "properties": { "temperature": { "type": "object", "properties": { "celsius": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Celsius." }, "fahrenheit": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Fahrenheit." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative temperature level." } }, "description": "Temperature threshold. One of 'celsius', 'fahrenheit', or 'quality' must be provided." }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Alerting threshold in %RH." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative humidity level." } }, "description": "Humidity threshold. One of 'relativePercentage' or 'quality' must be provided." }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "Alerting threshold for a water detection event. Must be set to true." } }, "required": [ "present" ], "description": "Water detection threshold. 'present' must be provided and set to true." }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "Alerting threshold for a door open event. Must be set to true." } }, "required": [ "open" ], "description": "Door open threshold. 'open' must be provided and set to true." }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as TVOC micrograms per cubic meter." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative TVOC level." } }, "description": "TVOC concentration threshold. One of 'concentration' or 'quality' must be provided." }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as CO2 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative CO2 level." } }, "description": "CO2 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as PM2.5 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative PM2.5 level." } }, "description": "PM2.5 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Alerting threshold as adjusted decibels." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative ambient noise level." } }, "description": "Ambient noise threshold. One of 'level' or 'quality' must be provided." } }, "required": [ "ambient" ], "description": "Noise threshold. 'ambient' must be provided." }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Alerting threshold as indoor air quality score." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative indoor air quality level." } }, "description": "Indoor air quality score threshold. One of 'score' or 'quality' must be provided." }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in watts. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Real power threshold. 'draw' must be provided." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in volt-amps. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Apparent power threshold. 'draw' must be provided." }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Alerting threshold as the ratio of active power to apparent power. Must be between 0 and 100." } }, "required": [ "percentage" ], "description": "Power factor threshold. 'percentage' must be provided." }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in amps. Must be between 0 and 15." } }, "required": [ "draw" ], "description": "Electrical current threshold. 'level' must be provided." }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in volts. Must be between 0 and 250." } }, "required": [ "level" ], "description": "Voltage threshold. 'level' must be provided." }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in hertz. Must be between 0 and 60." } }, "required": [ "level" ], "description": "Electrical frequency threshold. 'level' must be provided." }, "upstreamPower": { "type": "object", "properties": { "outageDetected": { "type": "boolean", "description": "Alerting threshold for an upstream power event. Must be set to true." } }, "required": [ "outageDetected" ], "description": "Upstream power threshold. 'outageDetected' must be provided and set to true." } }, "description": "Threshold for sensor readings that will cause an alert to be sent. This object should contain a single property key matching the condition's 'metric' value." }, "direction": { "type": "string", "enum": [ "above", "below" ], "description": "If 'above', an alert will be sent when a sensor reads above the threshold. If 'below', an alert will be sent when a sensor reads below the threshold. Only applicable for temperature, humidity, realPower, apparentPower, powerFactor, voltage, current, and frequency thresholds." }, "duration": { "type": "integer", "enum": [ 0, 60, 120, 180, 240, 300, 600, 900, 1800, 3600, 5400, 7200, 14400, 28800 ], "description": "Length of time in seconds that the triggering state must persist before an alert is sent. Available options are 0 seconds, 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 1 hour and 30 minutes, 2 hours, 4 hours, and 8 hours. Default is 0.", "default": 0 } }, "required": [ "metric", "threshold" ] }, "description": "List of conditions that will cause the profile to send an alert." }, "recipients": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "A list of emails that will receive information about the alert." }, "smsNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of SMS numbers that will receive information about the alert." }, "httpServerIds": { "type": "array", "items": { "type": "string" }, "description": "A list of webhook endpoint IDs that will receive information about the alert." } }, "description": "List of recipients that will receive the alert." }, "serials": { "type": "array", "items": { "type": "string" }, "description": "List of device serials assigned to this sensor alert profile." }, "includeSensorUrl": { "type": "boolean", "description": "Include dashboard link to sensor in messages (default: true)." }, "message": { "type": "string", "nullable": true, "description": "A custom message that will appear in email and text message alerts." } }, "example": { "name": "My Sensor Alert Profile", "schedule": { "id": "5" }, "conditions": [ { "metric": "temperature", "threshold": { "temperature": { "celsius": 20.5, "fahrenheit": 70.0, "quality": "good" }, "humidity": { "relativePercentage": 65, "quality": "inadequate" }, "water": { "present": true }, "door": { "open": true }, "tvoc": { "concentration": 400, "quality": "poor" }, "co2": { "concentration": 400, "quality": "poor" }, "pm25": { "concentration": 90, "quality": "fair" }, "noise": { "ambient": { "level": 120, "quality": "poor" } }, "indoorAirQuality": { "score": 80, "quality": "fair" }, "realPower": { "draw": 14.1 }, "apparentPower": { "draw": 17.2 }, "powerFactor": { "percentage": 81 }, "current": { "draw": 0.14 }, "voltage": { "level": 119.5 }, "frequency": { "level": 58.8 }, "upstreamPower": { "outageDetected": true } }, "direction": "above", "duration": 60 } ], "recipients": { "emails": [ "miles@meraki.com" ], "smsNumbers": [ "+15555555555" ], "httpServerIds": [ "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=" ] }, "serials": [ "Q234-ABCD-0001", "Q234-ABCD-0002", "Q234-ABCD-0003" ], "includeSensorUrl": true, "message": "Check with Miles on what to do." } } } }, "required": false }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "profileId": { "type": "string", "description": "ID of the sensor alert profile." }, "name": { "type": "string", "description": "Name of the sensor alert profile." }, "schedule": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the sensor schedule to use with the alert profile. If not defined, the alert profile will be active at all times." }, "name": { "type": "string", "description": "Name of the sensor schedule to use with the alert profile." } }, "description": "The sensor schedule to use with the alert profile." }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "metric": { "type": "string", "enum": [ "apparentPower", "co2", "current", "door", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "temperature", "tvoc", "upstreamPower", "voltage", "water" ], "description": "The type of sensor metric that will be monitored for changes." }, "threshold": { "type": "object", "properties": { "temperature": { "type": "object", "properties": { "celsius": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Celsius." }, "fahrenheit": { "type": "number", "format": "float", "description": "Alerting threshold in degrees Fahrenheit." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative temperature level." } }, "description": "Temperature threshold. One of 'celsius', 'fahrenheit', or 'quality' must be provided." }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Alerting threshold in %RH." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative humidity level." } }, "description": "Humidity threshold. One of 'relativePercentage' or 'quality' must be provided." }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "Alerting threshold for a water detection event. Must be set to true." } }, "required": [ "present" ], "description": "Water detection threshold. 'present' must be provided and set to true." }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "Alerting threshold for a door open event. Must be set to true." } }, "required": [ "open" ], "description": "Door open threshold. 'open' must be provided and set to true." }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as TVOC micrograms per cubic meter." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative TVOC level." } }, "description": "TVOC concentration threshold. One of 'concentration' or 'quality' must be provided." }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as CO2 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative CO2 level." } }, "description": "CO2 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "Alerting threshold as PM2.5 parts per million." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative PM2.5 level." } }, "description": "PM2.5 concentration threshold. One of 'concentration' or 'quality' must be provided." }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Alerting threshold as adjusted decibels." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative ambient noise level." } }, "description": "Ambient noise threshold. One of 'level' or 'quality' must be provided." } }, "required": [ "ambient" ], "description": "Noise threshold. 'ambient' must be provided." }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Alerting threshold as indoor air quality score." }, "quality": { "type": "string", "enum": [ "fair", "good", "inadequate", "poor" ], "description": "Alerting threshold as a qualitative indoor air quality level." } }, "description": "Indoor air quality score threshold. One of 'score' or 'quality' must be provided." }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in watts. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Real power threshold. 'draw' must be provided." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in volt-amps. Must be between 0 and 3750." } }, "required": [ "draw" ], "description": "Apparent power threshold. 'draw' must be provided." }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Alerting threshold as the ratio of active power to apparent power. Must be between 0 and 100." } }, "required": [ "percentage" ], "description": "Power factor threshold. 'percentage' must be provided." }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Alerting threshold in amps. Must be between 0 and 15." } }, "required": [ "draw" ], "description": "Electrical current threshold. 'level' must be provided." }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in volts. Must be between 0 and 250." } }, "required": [ "level" ], "description": "Voltage threshold. 'level' must be provided." }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Alerting threshold in hertz. Must be between 0 and 60." } }, "required": [ "level" ], "description": "Electrical frequency threshold. 'level' must be provided." }, "upstreamPower": { "type": "object", "properties": { "outageDetected": { "type": "boolean", "description": "Alerting threshold for an upstream power event. Must be set to true." } }, "required": [ "outageDetected" ], "description": "Upstream power threshold. 'outageDetected' must be provided and set to true." } }, "description": "Threshold for sensor readings that will cause an alert to be sent. This object should contain a single property key matching the condition's 'metric' value." }, "direction": { "type": "string", "enum": [ "above", "below" ], "description": "If 'above', an alert will be sent when a sensor reads above the threshold. If 'below', an alert will be sent when a sensor reads below the threshold. Only applicable for temperature, humidity, realPower, apparentPower, powerFactor, voltage, current, and frequency thresholds." }, "duration": { "type": "integer", "enum": [ 0, 60, 120, 180, 240, 300, 600, 900, 1800, 3600, 5400, 7200, 14400, 28800 ], "description": "Length of time in seconds that the triggering state must persist before an alert is sent. Available options are 0 seconds, 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 1 hour and 30 minutes, 2 hours, 4 hours, and 8 hours. Default is 0.", "default": 0 } }, "required": [ "metric", "threshold" ] }, "description": "List of conditions that will cause the profile to send an alert." }, "recipients": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "A list of emails that will receive information about the alert." }, "smsNumbers": { "type": "array", "items": { "type": "string" }, "description": "A list of SMS numbers that will receive information about the alert." }, "httpServerIds": { "type": "array", "items": { "type": "string" }, "description": "A list of webhook endpoint IDs that will receive information about the alert." } }, "description": "List of recipients that will receive the alert." }, "serials": { "type": "array", "items": { "type": "string" }, "description": "List of device serials assigned to this sensor alert profile." }, "includeSensorUrl": { "type": "boolean", "description": "Include dashboard link to sensor in messages (default: true)." }, "message": { "type": "string", "description": "A custom message that will appear in email and text message alerts." } }, "required": [ "conditions" ] }, "example": { "profileId": "1", "name": "My Sensor Alert Profile", "schedule": { "id": "5", "name": "My Schedule" }, "conditions": [ { "metric": "temperature", "threshold": { "temperature": { "celsius": 20.5, "fahrenheit": 70.0, "quality": "good" }, "humidity": { "relativePercentage": 65, "quality": "inadequate" }, "water": { "present": true }, "door": { "open": true }, "tvoc": { "concentration": 400, "quality": "poor" }, "co2": { "concentration": 400, "quality": "poor" }, "pm25": { "concentration": 90, "quality": "fair" }, "noise": { "ambient": { "level": 120, "quality": "poor" } }, "indoorAirQuality": { "score": 80, "quality": "fair" }, "realPower": { "draw": 14.1 }, "apparentPower": { "draw": 17.2 }, "powerFactor": { "percentage": 81 }, "current": { "draw": 0.14 }, "voltage": { "level": 119.5 }, "frequency": { "level": 58.8 }, "upstreamPower": { "outageDetected": true } }, "direction": "above", "duration": 60 } ], "recipients": { "emails": [ "miles@meraki.com" ], "smsNumbers": [ "+15555555555" ], "httpServerIds": [ "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=" ] }, "serials": [ "Q234-ABCD-0001", "Q234-ABCD-0002", "Q234-ABCD-0003" ], "includeSensorUrl": true, "message": "Check with Miles on what to do." } } } } }, "security": [ { "oauth2": [ "sensor:telemetry:write" ] } ], "summary": "Updates a sensor alert profile for a network.", "tags": [ "sensor", "configure", "alerts", "profiles" ] }, "delete": { "description": "Deletes a sensor alert profile from a network.", "operationId": "deleteNetworkSensorAlertsProfile", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true }, { "name": "id", "in": "path", "description": "ID", "schema": { "type": "string" }, "required": true } ], "responses": { "204": { "description": "Successful operation" } }, "security": [ { "oauth2": [ "sensor:telemetry:write" ] } ], "summary": "Deletes a sensor alert profile from a network.", "tags": [ "sensor", "configure", "alerts", "profiles" ] } }, "/networks/{networkId}/sensor/mqttBrokers": { "get": { "description": "List the sensor settings of all MQTT brokers for this network. To get the brokers themselves, use /networks/{networkId}/mqttBrokers.", "operationId": "getNetworkSensorMqttBrokers", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "mqttBrokerId": { "type": "string", "description": "ID of the MQTT Broker." }, "enabled": { "type": "boolean", "description": "Specifies whether the broker is enabled for sensor data. Currently, only a single broker may be enabled for sensor data." } } } }, "example": [ { "mqttBrokerId": "1234", "enabled": true } ] } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "List the sensor settings of all MQTT brokers for this network", "tags": [ "sensor", "configure", "mqttBrokers" ] } }, "/networks/{networkId}/sensor/mqttBrokers/{mqttBrokerId}": { "get": { "description": "Return the sensor settings of an MQTT broker. To get the broker itself, use /networks/{networkId}/mqttBrokers/{mqttBrokerId}.", "operationId": "getNetworkSensorMqttBroker", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true }, { "name": "mqttBrokerId", "in": "path", "description": "Mqtt broker ID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "mqttBrokerId": { "type": "string", "description": "ID of the MQTT Broker." }, "enabled": { "type": "boolean", "description": "Specifies whether the broker is enabled for sensor data. Currently, only a single broker may be enabled for sensor data." } } }, "example": { "mqttBrokerId": "1234", "enabled": true } } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "Return the sensor settings of an MQTT broker", "tags": [ "sensor", "configure", "mqttBrokers" ] }, "put": { "description": "Update the sensor settings of an MQTT broker. To update the broker itself, use /networks/{networkId}/mqttBrokers/{mqttBrokerId}.", "operationId": "updateNetworkSensorMqttBroker", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true }, { "name": "mqttBrokerId", "in": "path", "description": "Mqtt broker ID", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Set to true to enable MQTT broker for sensor network" } }, "example": { "mqttBrokerId": "1234", "enabled": true }, "required": [ "enabled" ] } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "mqttBrokerId": { "type": "string", "description": "ID of the MQTT Broker." }, "enabled": { "type": "boolean", "description": "Specifies whether the broker is enabled for sensor data. Currently, only a single broker may be enabled for sensor data." } } }, "example": { "mqttBrokerId": "1234", "enabled": true } } } } }, "security": [ { "oauth2": [ "sensor:telemetry:write" ] } ], "summary": "Update the sensor settings of an MQTT broker", "tags": [ "sensor", "configure", "mqttBrokers" ] } }, "/networks/{networkId}/sensor/relationships": { "get": { "description": "List the sensor roles for devices in a given network", "operationId": "getNetworkSensorRelationships", "parameters": [ { "name": "networkId", "in": "path", "description": "Network ID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "device": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the device" }, "serial": { "type": "string", "description": "The serial of the device" }, "productType": { "type": "string", "enum": [ "camera", "sensor" ], "description": "The product type of the device" } }, "description": "A sensor or gateway device in the network" }, "relationships": { "type": "object", "properties": { "livestream": { "type": "object", "properties": { "relatedDevices": { "type": "array", "items": { "type": "object", "properties": { "serial": { "type": "string", "description": "The serial of the related device" }, "productType": { "type": "string", "enum": [ "camera", "sensor" ], "description": "The product type of the related device" } } }, "description": "An array of the related devices for the role" } }, "description": "A role defined between an MT sensor and an MV camera that adds the camera's livestream to the sensor's details page. Snapshots from the camera will also appear in alert notifications that the sensor triggers." } }, "description": "An object describing the relationships defined between the device and other devices" } } } }, "example": [ { "device": { "name": "My sensor", "serial": "Q234-ABCD-0001", "productType": "sensor" }, "relationships": { "livestream": { "relatedDevices": [ { "serial": "Q234-ABCD-5678", "productType": "camera" } ] } } } ] } } } }, "security": [ { "oauth2": [ "sensor:config:read" ] } ], "summary": "List the sensor roles for devices in a given network", "tags": [ "sensor", "configure", "relationships" ] } }, "/organizations/{organizationId}/sensor/gateways/connections/latest": { "get": { "description": "Returns latest sensor-gateway connectivity data.", "operationId": "getOrganizationSensorGatewaysConnectionsLatest", "parameters": [ { "name": "organizationId", "in": "path", "description": "Organization ID", "schema": { "type": "string" }, "required": true }, { "name": "sensorSerials", "in": "query", "description": "List of sensor serials to filter connectivity data by sensor.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "perPage", "in": "query", "description": "The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.", "schema": { "type": "integer" } }, { "name": "startingAfter", "in": "query", "description": "A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } }, { "name": "endingBefore", "in": "query", "description": "A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "lastReportedAt": { "type": "string", "format": "date-time", "description": "Time, in ISO8601 format, when RSSI was last reported for the sensor and gateway pair." }, "lastConnectedAt": { "type": "string", "format": "date-time", "description": "Time, in ISO8601 format, when the sensor and gateway pair last connected." }, "rssi": { "type": "integer", "description": "Last reported RSSI value." }, "network": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the network." }, "id": { "type": "string", "description": "The id of the network." } }, "required": [ "name", "id" ], "description": "Information about the network that the sensor and gateway are in." }, "sensor": { "type": "object", "properties": { "serial": { "type": "string", "description": "The serial number of the sensor." }, "name": { "type": "string", "description": "The name of the sensor." }, "mac": { "type": "string", "description": "The MAC address of the sensor." } }, "required": [ "name", "mac" ], "description": "Information about the sensor." }, "gateway": { "type": "object", "properties": { "serial": { "type": "string", "description": "The serial number of the gateway." }, "name": { "type": "string", "description": "The name of the gateway." }, "mac": { "type": "string", "description": "The MAC address of the gateway." } }, "required": [ "name", "mac" ], "description": "Information about the gateway." } }, "required": [ "lastReportedAt", "rssi", "network", "sensor", "gateway" ] }, "description": "The organization's RSSI information between sensor-gateway pairs." }, "meta": { "type": "object", "properties": { "counts": { "type": "object", "properties": { "items": { "type": "object", "properties": { "total": { "type": "integer", "description": "The total number of sensor-gateway pairs with reported RSSI data." }, "remaining": { "type": "integer", "description": "The number of sensor-gateway pairs with reported RSSI data that are available on subsequent pages" } }, "description": "The count metadata." } }, "description": "Count metadata related to this result set." } }, "description": "Other metadata related to this result set." } }, "required": [ "items" ] }, "example": { "items": [ { "lastReportedAt": "2024-09-04T19:29:05Z", "lastConnectedAt": "2024-09-04T19:29:05Z", "rssi": -24, "network": { "name": "My sensor", "id": "N_12345678" }, "sensor": { "serial": "Q234-ABCD-0001", "name": "My sensor", "mac": "00:11:22:33:44:55" }, "gateway": { "serial": "Q234-ABCD-0004", "name": "My gateway", "mac": "22:33:44:55:66:77" } } ], "meta": { "counts": { "items": { "total": 20, "remaining": 0 } } } } } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "A comma-separated list of first, last, prev, and next relative links used for subsequent paginated requests." } } } }, "summary": "Returns latest sensor-gateway connectivity data.", "tags": [ "sensor", "monitor", "gateways", "connections", "latest" ] } }, "/organizations/{organizationId}/sensor/readings/history": { "get": { "description": "Return all reported readings from sensors in a given timespan, sorted by timestamp", "operationId": "getOrganizationSensorReadingsHistory", "parameters": [ { "name": "organizationId", "in": "path", "description": "Organization ID", "schema": { "type": "string" }, "required": true }, { "name": "perPage", "in": "query", "description": "The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.", "schema": { "type": "integer" } }, { "name": "startingAfter", "in": "query", "description": "A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } }, { "name": "endingBefore", "in": "query", "description": "A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } }, { "name": "t0", "in": "query", "description": "The beginning of the timespan for the data. The maximum lookback period is 365 days, 5 hours, 49 minutes, and 12 seconds from today.", "schema": { "type": "string" } }, { "name": "t1", "in": "query", "description": "The end of the timespan for the data. t1 can be a maximum of 7 days after t0.", "schema": { "type": "string" } }, { "name": "timespan", "in": "query", "description": "The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 7 days. The default is 2 hours.", "schema": { "type": "number", "format": "float", "maximum": 604800 } }, { "name": "networkIds", "in": "query", "description": "Optional parameter to filter readings by network.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "serials", "in": "query", "description": "Optional parameter to filter readings by sensor.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "metrics", "in": "query", "description": "Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved.", "schema": { "type": "array", "items": { "type": "string", "enum": [ "apparentPower", "battery", "button", "co2", "current", "door", "downstreamPower", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "realPower", "remoteLockoutSwitch", "temperature", "tvoc", "voltage", "water" ] } } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "serial": { "type": "string", "description": "Serial number of the sensor that took the reading." }, "network": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the network." }, "name": { "type": "string", "description": "Name of the network." } }, "description": "Network to which the sensor belongs." }, "ts": { "type": "string", "description": "Time at which the reading occurred, in ISO8601 format." }, "metric": { "type": "string", "enum": [ "apparentPower", "battery", "button", "co2", "current", "door", "downstreamPower", "frequency", "humidity", "indoorAirQuality", "no2", "noise", "o3", "pm10", "pm25", "powerFactor", "rawTemperature", "realPower", "remoteLockoutSwitch", "temperature", "tvoc", "voltage", "water" ], "description": "Type of sensor reading." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Apparent power reading in volt-amperes." } }, "description": "Reading for the 'apparentPower' metric. This will only be present if the 'metric' property equals 'apparentPower'.", "nullable": true }, "battery": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Remaining battery life." } }, "description": "Reading for the 'battery' metric. This will only be present if the 'metric' property equals 'battery'.", "nullable": true }, "button": { "type": "object", "properties": { "pressType": { "type": "string", "enum": [ "long", "short" ], "description": "Type of button press that occurred." } }, "description": "Reading for the 'button' metric. This will only be present if the 'metric' property equals 'button'.", "nullable": true }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "CO2 reading in parts per million." } }, "description": "Reading for the 'co2' metric. This will only be present if the 'metric' property equals 'co2'.", "nullable": true }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Electrical current reading in amperes." } }, "description": "Reading for the 'current' metric. This will only be present if the 'metric' property equals 'current'.", "nullable": true }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "True if the door is open." } }, "description": "Reading for the 'door' metric. This will only be present if the 'metric' property equals 'door'.", "nullable": true }, "downstreamPower": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "True if power is turned on to the device that is connected downstream of the MT40 power monitor." } }, "description": "Reading for the 'downstreamPower' metric. This will only be present if the 'metric' property equals 'downstreamPower'.", "nullable": true }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Electrical current frequency reading in hertz." } }, "description": "Reading for the 'frequency' metric. This will only be present if the 'metric' property equals 'frequency'.", "nullable": true }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Humidity reading in %RH." } }, "description": "Reading for the 'humidity' metric. This will only be present if the 'metric' property equals 'humidity'.", "nullable": true }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Indoor air quality score between 0 and 100." } }, "description": "Reading for the 'indoorAirQuality' metric. This will only be present if the 'metric' property equals 'indoorAirQuality'.", "nullable": true }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Ambient noise reading in adjusted decibels." } }, "description": "Ambient noise reading." } }, "description": "Reading for the 'noise' metric. This will only be present if the 'metric' property equals 'noise'.", "nullable": true }, "no2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "NO2 reading in parts per billion." } }, "description": "Reading for the 'no2' metric. This will only be present if the 'metric' property equals 'no2'.", "nullable": true }, "o3": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "O3 reading in parts per billion." } }, "description": "Reading for the 'o3' metric. This will only be present if the 'metric' property equals 'o3'.", "nullable": true }, "pm10": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "PM10 reading in micrograms per cubic meter." } }, "description": "Reading for the 'pm10' metric. This will only be present if the 'metric' property equals 'pm10'.", "nullable": true }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "PM2.5 reading in micrograms per cubic meter." } }, "description": "Reading for the 'pm25' metric. This will only be present if the 'metric' property equals 'pm25'.", "nullable": true }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Power factor reading as a percentage." } }, "description": "Reading for the 'powerFactor' metric. This will only be present if the 'metric' property equals 'powerFactor'.", "nullable": true }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Real power reading in watts." } }, "description": "Reading for the 'realPower' metric. This will only be present if the 'metric' property equals 'realPower'.", "nullable": true }, "remoteLockoutSwitch": { "type": "object", "properties": { "locked": { "type": "boolean", "description": "True if power controls are disabled via the MT40's physical remote lockout switch." } }, "description": "Reading for the 'remoteLockoutSwitch' metric. This will only be present if the 'metric' property equals 'remoteLockoutSwitch'.", "nullable": true }, "temperature": { "type": "object", "properties": { "fahrenheit": { "type": "number", "format": "float", "description": "Temperature reading in degrees Fahrenheit." }, "celsius": { "type": "number", "format": "float", "description": "Temperature reading in degrees Celsius." } }, "description": "Reading for the 'temperature' metric. This will only be present if the 'metric' property equals 'temperature'.", "nullable": true }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "TVOC reading in micrograms per cubic meter." } }, "description": "Reading for the 'tvoc' metric. This will only be present if the 'metric' property equals 'tvoc'.", "nullable": true }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Voltage reading in volts." } }, "description": "Reading for the 'voltage' metric. This will only be present if the 'metric' property equals 'voltage'.", "nullable": true }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "True if water is detected." } }, "description": "Reading for the 'water' metric. This will only be present if the 'metric' property equals 'water'.", "nullable": true }, "rawTemperature": { "type": "object", "properties": { "fahrenheit": { "type": "number", "format": "float", "description": "Temperature reading in degrees Fahrenheit unadjusted for any normally applied calibration offset." }, "celsius": { "type": "number", "format": "float", "description": "Temperature reading in degrees Celsius unadjusted for any normally applied calibration offset." } }, "description": "Reading for the 'rawTemperature' metric. This will only be present if the 'metric' property equals 'rawTemperature'.", "nullable": true } } } }, "example": [ { "serial": "Q234-ABCD-5678", "network": { "id": "N_24329156", "name": "Main Office" }, "ts": "2021-10-18T23:54:48.000000Z", "metric": "temperature", "apparentPower": { "draw": 15.9 }, "battery": { "percentage": 91 }, "button": { "pressType": "short" }, "co2": { "concentration": 100 }, "current": { "draw": 0.13 }, "door": { "open": true }, "downstreamPower": { "enabled": true }, "frequency": { "level": 60.1 }, "humidity": { "relativePercentage": 34 }, "indoorAirQuality": { "score": 89 }, "noise": { "ambient": { "level": 45 } }, "no2": { "concentration": 25 }, "o3": { "concentration": 30 }, "pm10": { "concentration": 50 }, "pm25": { "concentration": 100 }, "powerFactor": { "percentage": 86 }, "realPower": { "draw": 13.7 }, "remoteLockoutSwitch": { "locked": false }, "temperature": { "fahrenheit": 77.81, "celsius": 25.45 }, "tvoc": { "concentration": 100 }, "voltage": { "level": 122.4 }, "water": { "present": true }, "rawTemperature": { "fahrenheit": 75.3, "celsius": 24.06 } } ] } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "A comma-separated list of first, last, prev, and next relative links used for subsequent paginated requests." } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "Return all reported readings from sensors in a given timespan, sorted by timestamp", "tags": [ "sensor", "monitor", "readings", "history" ] } }, "/organizations/{organizationId}/sensor/readings/latest": { "get": { "description": "Return the latest available reading for each metric from each sensor, sorted by sensor serial", "operationId": "getOrganizationSensorReadingsLatest", "parameters": [ { "name": "organizationId", "in": "path", "description": "Organization ID", "schema": { "type": "string" }, "required": true }, { "name": "perPage", "in": "query", "description": "The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.", "schema": { "type": "integer" } }, { "name": "startingAfter", "in": "query", "description": "A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } }, { "name": "endingBefore", "in": "query", "description": "A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.", "schema": { "type": "string" } }, { "name": "networkIds", "in": "query", "description": "Optional parameter to filter readings by network.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "serials", "in": "query", "description": "Optional parameter to filter readings by sensor.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "metrics", "in": "query", "description": "Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved.", "schema": { "type": "array", "items": { "type": "string", "enum": [ "apparentPower", "battery", "button", "co2", "current", "door", "downstreamPower", "frequency", "humidity", "indoorAirQuality", "noise", "pm25", "powerFactor", "rawTemperature", "realPower", "remoteLockoutSwitch", "temperature", "tvoc", "voltage", "water" ] } } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "serial": { "type": "string", "description": "Serial number of the sensor that took the readings." }, "network": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the network." }, "name": { "type": "string", "description": "Name of the network." } }, "description": "Network to which the sensor belongs." }, "readings": { "type": "array", "items": { "type": "object", "properties": { "ts": { "type": "string", "description": "Time at which the reading occurred, in ISO8601 format." }, "metric": { "type": "string", "enum": [ "apparentPower", "battery", "button", "co2", "current", "door", "downstreamPower", "frequency", "humidity", "indoorAirQuality", "no2", "noise", "o3", "pm10", "pm25", "powerFactor", "rawTemperature", "realPower", "remoteLockoutSwitch", "temperature", "tvoc", "voltage", "water" ], "description": "Type of sensor reading." }, "apparentPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Apparent power reading in volt-amperes." } }, "description": "Reading for the 'apparentPower' metric. This will only be present if the 'metric' property equals 'apparentPower'.", "nullable": true }, "battery": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Remaining battery life." } }, "description": "Reading for the 'battery' metric. This will only be present if the 'metric' property equals 'battery'.", "nullable": true }, "button": { "type": "object", "properties": { "pressType": { "type": "string", "enum": [ "long", "short" ], "description": "Type of button press that occurred." } }, "description": "Reading for the 'button' metric. This will only be present if the 'metric' property equals 'button'.", "nullable": true }, "co2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "CO2 reading in parts per million." } }, "description": "Reading for the 'co2' metric. This will only be present if the 'metric' property equals 'co2'.", "nullable": true }, "current": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Electrical current reading in amperes." } }, "description": "Reading for the 'current' metric. This will only be present if the 'metric' property equals 'current'.", "nullable": true }, "door": { "type": "object", "properties": { "open": { "type": "boolean", "description": "True if the door is open." } }, "description": "Reading for the 'door' metric. This will only be present if the 'metric' property equals 'door'.", "nullable": true }, "downstreamPower": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "True if power is turned on to the device that is connected downstream of the MT40 power monitor." } }, "description": "Reading for the 'downstreamPower' metric. This will only be present if the 'metric' property equals 'downstreamPower'.", "nullable": true }, "frequency": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Electrical current frequency reading in hertz." } }, "description": "Reading for the 'frequency' metric. This will only be present if the 'metric' property equals 'frequency'.", "nullable": true }, "humidity": { "type": "object", "properties": { "relativePercentage": { "type": "integer", "description": "Humidity reading in %RH." } }, "description": "Reading for the 'humidity' metric. This will only be present if the 'metric' property equals 'humidity'.", "nullable": true }, "indoorAirQuality": { "type": "object", "properties": { "score": { "type": "integer", "description": "Indoor air quality score between 0 and 100." } }, "description": "Reading for the 'indoorAirQuality' metric. This will only be present if the 'metric' property equals 'indoorAirQuality'.", "nullable": true }, "noise": { "type": "object", "properties": { "ambient": { "type": "object", "properties": { "level": { "type": "integer", "description": "Ambient noise reading in adjusted decibels." } }, "description": "Ambient noise reading." } }, "description": "Reading for the 'noise' metric. This will only be present if the 'metric' property equals 'noise'.", "nullable": true }, "no2": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "NO2 reading in parts per billion." } }, "description": "Reading for the 'no2' metric. This will only be present if the 'metric' property equals 'no2'.", "nullable": true }, "o3": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "O3 reading in parts per billion." } }, "description": "Reading for the 'o3' metric. This will only be present if the 'metric' property equals 'o3'.", "nullable": true }, "pm10": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "PM10 reading in micrograms per cubic meter." } }, "description": "Reading for the 'pm10' metric. This will only be present if the 'metric' property equals 'pm10'.", "nullable": true }, "pm25": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "PM2.5 reading in micrograms per cubic meter." } }, "description": "Reading for the 'pm25' metric. This will only be present if the 'metric' property equals 'pm25'.", "nullable": true }, "powerFactor": { "type": "object", "properties": { "percentage": { "type": "integer", "description": "Power factor reading as a percentage." } }, "description": "Reading for the 'powerFactor' metric. This will only be present if the 'metric' property equals 'powerFactor'.", "nullable": true }, "realPower": { "type": "object", "properties": { "draw": { "type": "number", "format": "float", "description": "Real power reading in watts." } }, "description": "Reading for the 'realPower' metric. This will only be present if the 'metric' property equals 'realPower'.", "nullable": true }, "remoteLockoutSwitch": { "type": "object", "properties": { "locked": { "type": "boolean", "description": "True if power controls are disabled via the MT40's physical remote lockout switch." } }, "description": "Reading for the 'remoteLockoutSwitch' metric. This will only be present if the 'metric' property equals 'remoteLockoutSwitch'.", "nullable": true }, "temperature": { "type": "object", "properties": { "fahrenheit": { "type": "number", "format": "float", "description": "Temperature reading in degrees Fahrenheit." }, "celsius": { "type": "number", "format": "float", "description": "Temperature reading in degrees Celsius." } }, "description": "Reading for the 'temperature' metric. This will only be present if the 'metric' property equals 'temperature'.", "nullable": true }, "tvoc": { "type": "object", "properties": { "concentration": { "type": "integer", "description": "TVOC reading in micrograms per cubic meter." } }, "description": "Reading for the 'tvoc' metric. This will only be present if the 'metric' property equals 'tvoc'.", "nullable": true }, "voltage": { "type": "object", "properties": { "level": { "type": "number", "format": "float", "description": "Voltage reading in volts." } }, "description": "Reading for the 'voltage' metric. This will only be present if the 'metric' property equals 'voltage'.", "nullable": true }, "water": { "type": "object", "properties": { "present": { "type": "boolean", "description": "True if water is detected." } }, "description": "Reading for the 'water' metric. This will only be present if the 'metric' property equals 'water'.", "nullable": true }, "rawTemperature": { "type": "object", "properties": { "fahrenheit": { "type": "number", "format": "float", "description": "Temperature reading in degrees Fahrenheit unadjusted for any normally applied calibration offset." }, "celsius": { "type": "number", "format": "float", "description": "Temperature reading in degrees Celsius unadjusted for any normally applied calibration offset." } }, "description": "Reading for the 'rawTemperature' metric. This will only be present if the 'metric' property equals 'rawTemperature'.", "nullable": true } } }, "description": "Array of latest readings from the sensor. Each object represents a single reading for a single metric." } } } }, "example": [ { "serial": "Q234-ABCD-5678", "network": { "id": "N_24329156", "name": "Main Office" }, "readings": [ { "ts": "2021-10-18T23:54:48.000000Z", "metric": "temperature", "apparentPower": { "draw": 15.9 }, "battery": { "percentage": 91 }, "button": { "pressType": "short" }, "co2": { "concentration": 100 }, "current": { "draw": 0.13 }, "door": { "open": true }, "downstreamPower": { "enabled": true }, "frequency": { "level": 60.1 }, "humidity": { "relativePercentage": 34 }, "indoorAirQuality": { "score": 89 }, "noise": { "ambient": { "level": 45 } }, "no2": { "concentration": 25 }, "o3": { "concentration": 30 }, "pm10": { "concentration": 50 }, "pm25": { "concentration": 100 }, "powerFactor": { "percentage": 86 }, "realPower": { "draw": 13.7 }, "remoteLockoutSwitch": { "locked": false }, "temperature": { "fahrenheit": 77.81, "celsius": 25.45 }, "tvoc": { "concentration": 100 }, "voltage": { "level": 122.4 }, "water": { "present": true }, "rawTemperature": { "fahrenheit": 75.3, "celsius": 24.06 } } ] } ] } }, "headers": { "Link": { "schema": { "type": "string" }, "description": "A comma-separated list of first, last, prev, and next relative links used for subsequent paginated requests." } } } }, "security": [ { "oauth2": [ "sensor:telemetry:read" ] } ], "summary": "Return the latest available reading for each metric from each sensor, sorted by sensor serial", "tags": [ "sensor", "monitor", "readings", "latest" ] } } } }