{"_id":"56b510ee5997532100bc6be9","version":{"_id":"563bcb6c2eecbf0d003c5b76","project":"563bcb6b2eecbf0d003c5b73","__v":8,"createdAt":"2015-11-05T21:34:36.022Z","releaseDate":"2015-11-05T21:34:36.022Z","categories":["563bcb6c2eecbf0d003c5b77","5661fa5355e4450d00e62c64","5661fa63b401c70d00dde776","5668931d8639090d00759424","56a25e530aefae0d00b7fe33","56a2844ed00f7d0d00c8f072","56b4fe0a6874f40d00f02bcc","56b510327bccae0d00e9a1a5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"editedParams":true,"editedParams2":true,"githubsync":"","project":"563bcb6b2eecbf0d003c5b73","user":"563bcb458a9ce40d00eea1ae","__v":1,"parentDoc":null,"category":{"_id":"56b510327bccae0d00e9a1a5","pages":["56b510ee5997532100bc6be9","56b514db5997532100bc6bf0","56b5166e99c8d30d00f55870"],"__v":3,"project":"563bcb6b2eecbf0d003c5b73","version":"563bcb6c2eecbf0d003c5b76","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-05T21:12:18.778Z","from_sync":false,"order":4,"slug":"for-developers","title":"For Developers"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-05T21:15:26.073Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"get","results":{"codes":[{"language":"json","code":"Return Format\nReturns a JSON object with two attributes:\n\"units\" which is the units of the returned measurement.\n\"data\" which is an array of JSON objects each with two attributes. \"t\" the time of the data point, and \"v\" the measurement\n\n{\"units\": \"watts\", \"data\": [{\"t\": \"2013-01-18T21:52:13.000Z\", \"v\": 234}, {\"t\": \"2013-01-18T21:52:18.000Z\", \"v\": 151}, {\"t\": \"2013-01-18T21:52:23.000Z\", \"v\": 198}, {\"t\": \"2013-01-18T21:52:28.000Z\", \"v\": 247}, {\"t\": \"2013-01-18T21:52:35.000Z\", \"v\": 176}, {\"t\": \"2013-01-18T21:52:45.000Z\", \"v\": 168}, {\"t\": \"2013-01-18T21:52:50.000Z\", \"v\": 167}, {\"t\": \"2013-01-18T21:52:55.000Z\", \"v\": 225}, {\"t\": \"2013-01-18T21:53:01.000Z\", \"v\": 237}, {\"t\": \"2013-01-18T21:53:05.000Z\", \"v\": 178}, {\"t\": \"2013-01-18T21:53:11.000Z\", \"v\": 190}, {\"t\": \"2013-01-18T21:53:16.000Z\", \"v\": 222}, {\"t\": \"2013-01-18T21:53:21.000Z\", \"v\": 211}, {\"t\": \"2013-01-18T21:57:42.000Z\", \"v\": 232}, {\"t\": \"2013-01-18T21:57:47.000Z\", \"v\": 162}, {\"t\": \"2013-01-18T21:57:51.000Z\", \"v\": 236}, {\"t\": \"2013-01-18T21:57:56.000Z\", \"v\": 191}, {\"t\": \"2013-01-18T21:58:01.000Z\", \"v\": 211}, {\"t\": \"2013-01-18T21:58:05.000Z\", \"v\": 157}, {\"t\": \"2013-01-18T21:58:10.000Z\", \"v\": 174}, {\"t\": \"2013-01-18T21:58:15.000Z\", \"v\": 167}, {\"t\": \"2013-01-18T21:58:19.000Z\", \"v\": 195}, {\"t\": \"2013-01-18T21:58:26.000Z\", \"v\": 159}, {\"t\": \"2013-01-18T21:58:31.000Z\", \"v\": 179}, {\"t\": \"2013-01-18T21:58:35.000Z\", \"v\": 153}, {\"t\": \"2013-01-18T21:58:40.000Z\", \"v\": 226}, {\"t\": \"2013-01-18T21:58:45.000Z\", \"v\": 238}, {\"t\": \"2013-01-18T21:58:50.000Z\", \"v\": 218}, {\"t\": \"2013-01-18T21:58:55.000Z\", \"v\": 249}, {\"t\": \"2013-01-18T21:59:00.000Z\", \"v\": 195}, {\"t\": \"2013-01-18T21:59:04.000Z\", \"v\": 237}, {\"t\": \"2013-01-18T21:59:09.000Z\", \"v\": 181}, {\"t\": \"2013-01-18T21:59:14.000Z\", \"v\": 218}, {\"t\": \"2013-01-18T21:59:19.000Z\", \"v\": 195}, {\"t\": \"2013-01-18T22:06:25.000Z\", \"v\": 184}, {\"t\": \"2013-01-18T22:06:29.000Z\", \"v\": 172}, {\"t\": \"2013-01-18T22:06:34.000Z\", \"v\": 247}, {\"t\": \"2013-01-18T22:06:39.000Z\", \"v\": 162}, {\"t\": \"2013-01-18T22:06:45.000Z\", \"v\": 218}, {\"t\": \"2013-01-18T22:06:50.000Z\", \"v\": 185}, {\"t\": \"2013-01-18T22:06:54.000Z\", \"v\": 199}, {\"t\": \"2013-01-18T22:06:59.000Z\", \"v\": 172}, {\"t\": \"2013-01-18T22:07:04.000Z\", \"v\": 194}, {\"t\": \"2013-01-18T22:07:10.000Z\", \"v\": 241}, {\"t\": \"2013-01-18T22:07:15.000Z\", \"v\": 241}, {\"t\": \"2013-01-18T22:07:20.000Z\", \"v\": 193}, {\"t\": \"2013-01-18T22:07:38.000Z\", \"v\": 221}, {\"t\": \"2013-01-18T22:07:51.000Z\", \"v\": 175}, {\"t\": \"2013-01-18T22:08:03.000Z\", \"v\": 229}, {\"t\": \"2013-01-18T22:08:16.000Z\", \"v\": 183}, {\"t\": \"2013-01-18T22:08:28.000Z\", \"v\": 162}, {\"t\": \"2013-01-18T22:08:39.000Z\", \"v\": 222}, {\"t\": \"2013-01-18T22:08:51.000Z\", \"v\": 220}, {\"t\": \"2013-01-18T22:09:06.000Z\", \"v\": 176}, {\"t\": \"2013-01-18T22:09:12.000Z\", \"v\": 173}, {\"t\": \"2013-01-18T22:09:18.000Z\", \"v\": 221}, {\"t\": \"2013-01-18T22:09:23.000Z\", \"v\": 184}, {\"t\": \"2013-01-18T22:09:28.000Z\", \"v\": 181}, {\"t\": \"2013-01-18T22:09:33.000Z\", \"v\": 176}, {\"t\": \"2013-01-18T22:09:37.000Z\", \"v\": 219}, {\"t\": \"2013-01-18T22:09:42.000Z\", \"v\": 190}, {\"t\": \"2013-01-18T22:09:47.000Z\", \"v\": 194}, {\"t\": \"2013-01-18T22:09:51.000Z\", \"v\": 229}, {\"t\": \"2013-01-18T22:09:57.000Z\", \"v\": 174}, {\"t\": \"2013-01-18T22:10:02.000Z\", \"v\": 204}, {\"t\": \"2013-01-18T22:10:10.000Z\", \"v\": 161}, {\"t\": \"2013-01-18T22:10:15.000Z\", \"v\": 226}, {\"t\": \"2013-01-18T22:10:20.000Z\", \"v\": 221}, {\"t\": \"2013-01-18T22:10:25.000Z\", \"v\": 161}, {\"t\": \"2013-01-18T22:10:29.000Z\", \"v\": 168}, {\"t\": \"2013-01-18T22:10:34.000Z\", \"v\": 184}, {\"t\": \"2013-01-18T22:10:39.000Z\", \"v\": 169}, {\"t\": \"2013-01-18T22:10:43.000Z\", \"v\": 197}, {\"t\": \"2013-01-18T22:10:49.000Z\", \"v\": 214}, {\"t\": \"2013-01-18T22:10:54.000Z\", \"v\": 153}, {\"t\": \"2013-01-18T22:10:59.000Z\", \"v\": 213}, {\"t\": \"2013-01-18T22:11:04.000Z\", \"v\": 240}, {\"t\": \"2013-01-18T22:11:10.000Z\", \"v\": 242}, {\"t\": \"2013-01-18T22:11:14.000Z\", \"v\": 246}]}"}]},"settings":"","auth":"required","params":[{"_id":"56b510ee5997532100bc6bec","ref":"","in":"path","required":true,"desc":"The sensor ID to get data from. Found on API Settings Page.","default":"","type":"string","name":"sensor_id"},{"_id":"56b510ee5997532100bc6beb","ref":"","in":"path","required":true,"desc":"The API ID. Found on API Settings Page.","default":"","type":"string","name":"api_id"},{"_id":"56b510ee5997532100bc6bea","ref":"","in":"path","required":true,"desc":"The API KEY. Found on API Settings Page.","default":"","type":"string","name":"api_key"},{"_id":"56b512a7eed075230097d72f","ref":"","in":"path","required":true,"desc":"'rate', 'consumption' 'latest_rate' or 'net_consumption' see description below.","default":"","type":"string","name":"type"},{"_id":"56b512a7eed075230097d72e","ref":"","in":"path","required":true,"desc":"ISO UTC start time for data range","default":"","type":"timestamp","name":"start_time"},{"_id":"56b512a7eed075230097d72d","ref":"","in":"path","required":true,"desc":"ISO UTC end time for data range","default":"","type":"timestamp","name":"end_time"}],"url":"/elec?sensor_id=:sensor_id&api_id=:api_id&api_key=:api_key&type=:type&start_time=:start_time&end_time=:end_time"},"isReference":false,"order":1,"body":"Your [API Settings Page can be found here](https://www.wattvision.com/usr/api).\n\n## the \"type\" parameter must be one of:\n**rate** returns an list of timestamps and watts at that timestamp \n**consumption** returns a list of timestamps and delta watthours\n**latest_rate** returns the most recent rate in watts (as long as some data was uploaded within the last two hours) \n**net_consumption** returns the total net consumption between any two points in time (only available on paid accounts)","excerpt":"","slug":"download-data-from-wattvision","type":"endpoint","title":"Download Data from Wattvision"}

getDownload Data from Wattvision


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

sensor_id:
required
string
The sensor ID to get data from. Found on API Settings Page.
api_id:
required
string
The API ID. Found on API Settings Page.
api_key:
required
string
The API KEY. Found on API Settings Page.
type:
required
string
'rate', 'consumption' 'latest_rate' or 'net_consumption' see description below.
start_time:
required
timestamp
ISO UTC start time for data range
end_time:
required
timestamp
ISO UTC end time for data range

Result Format


Documentation

Your [API Settings Page can be found here](https://www.wattvision.com/usr/api). ## the "type" parameter must be one of: **rate** returns an list of timestamps and watts at that timestamp **consumption** returns a list of timestamps and delta watthours **latest_rate** returns the most recent rate in watts (as long as some data was uploaded within the last two hours) **net_consumption** returns the total net consumption between any two points in time (only available on paid accounts)

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}