Get measurement data
GET
/edgeDevices/{edgeDeviceId}/measurementData
Path Parameters
- edgeDeviceIdstringrequiredDescription
Query Parameters
- granularitystringrequiredExampleDescription
- fromstringExampleDescription
- tostringExampleDescription
- fields[]stringExampleDescription
- $skipnumberExampleDescription
Header Parameters
- AuthorizationstringrequiredExample
{ "Authorization": "Bearer {jwt token}" }Description
Responses
200
- object
- totalnumberDescription
- limitnumberDescription
- skipnumberDescription
- dataobject[]
- timestringExampleDescription
- l1_pnumberDescription
- l2_pnumberDescription
- l3_pnumberDescription
- l1_qnumberDescription
- l2_qnumberDescription
- l3_qnumberDescription
- l1_snumberDescription
- l2_snumberDescription
- l3_snumberDescription
- l1_unumberDescription
- l2_unumberDescription
- l3_unumberDescription
- l1_inumberDescription
- l2_inumberDescription
- l3_inumberDescription
- l1_energynumberDescription
- l2_energynumberDescription
- l3_energynumberDescription
400
- object
- namestringExampleDescription
- messagestringExampleDescription
- codenumberExampleDescription
- classNamestringExampleDescription
- datastringDescription
- errorsobject[]Example
[ "detailed description of error" ]
Description
401
- object
- namestringExampleDescription
- messagestringExampleDescription
- codenumberExampleDescription
- classNamestringExampleDescription
- errorsobjectDescription
403
- object
- namestringExampleDescription
- messagestringExampleDescription
- codenumberExampleDescription
- classNamestringExampleDescription
- errorsobjectDescription
curl
curl --request GET \
--url '/edgeDevices/{edgeDeviceId}/measurementData?granularity=t' \
--header 'accept: application/json' \
--header 'authorization: {"Authorization":"Bearer {jwt token}"}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("authorization", "{\"Authorization\":\"Bearer {jwt token}\"}");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/edgeDevices/{edgeDeviceId}/measurementData?granularity=t", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/edgeDevices/{edgeDeviceId}/measurementData?granularity=t")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["authorization"] = "{\"Authorization\":\"Bearer {jwt token}\"}"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/edgeDevices/{edgeDeviceId}/measurementData?granularity=t"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'authorization': '{"Authorization":"Bearer {jwt token}"}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"total": 0,
"limit": 0,
"skip": 0,
"data": [
{
"time": "2023-01-01T00:00:00.000Z",
"l1_p": 0,
"l2_p": 0,
"l3_p": 0,
"l1_q": 0,
"l2_q": 0,
"l3_q": 0,
"l1_s": 0,
"l2_s": 0,
"l3_s": 0,
"l1_u": 0,
"l2_u": 0,
"l3_u": 0,
"l1_i": 0,
"l2_i": 0,
"l3_i": 0,
"l1_energy": 0,
"l2_energy": 0,
"l3_energy": 0
}
]
}400
// Bad Request
{
"name": "BadRequest",
"message": "Data does not match schema",
"code": 400,
"className": "bad-request",
"data": "",
"errors": [
{}
]
}401
// Unauthorized
{
"name": "NotAuthenticated",
"message": "Not authenticated",
"code": 401,
"className": "not-authenticated",
"errors": {}
}403
// Forbidden
{
"name": "Forbidden",
"message": "Access Forbidden",
"code": 403,
"className": "forbidden",
"errors": {}
}Allows to retrieve measurement data from a specific edge-device. Specify a specific time frame, granularity, and returned fields with the query parameters. If no 'from' and 'to' parameters are specified, only the most recent data point is returned.