-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.http
44 lines (37 loc) · 1.56 KB
/
data.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
### [Data] Get data for asset 4711 filtered by data subtype (read-only)
GET {{api-server}}/v2/data?assetId=4711&dataSubtype=input HTTP/1.1
X-Api-Key: {{read-only-token}}
### [Data] Get data for asset 4711 with multiple filters (read-only)
GET {{api-server}}/v2/data?assetId=4711&parentAssetId=4700&dataSubtype=info HTTP/1.1
X-Api-Key: {{read-only-token}}
### [Data] Create or update asset data with a client reference (read–write)
PUT {{api-server}}/v2/data?directMode=true HTTP/1.1
X-Api-Key: {{read-write-token}}
Content-Type: application/json
{
"assetId": 64609,
"subtype": "input",
"data": {
"Counter": 1234
},
"clientReference": "ABC123"
}
### [Data] Get trend of historical data for an asset (data-trend)
GET {{api-server}}/v2/data-trend/4711?dataSubtype=input&attributeName=temperature&fromDate=2020-01-01T09:00:00.000Z&toDate=2021-12-31T23:00:00.000Z&offset=0&size=20 HTTP/1.1
X-Api-Key: {{read-only-token}}
### [Data] Get aggregated trend of historical data for an asset (data-trend-aggregated)
GET {{api-server}}/v2/data-trend-aggregated/4711?dataSubtype=input&attributeName=temperature&aggregationRaster=1d&sumMethod=sum&fromDate=2020-01-01T09:00:00.000Z&toDate=2021-12-31T23:00:00.000Z&offset=0&size=20 HTTP/1.1
X-Api-Key: {{read-only-token}}
### [Data] Put historical data for an asset (data-trend)
PUT {{api-server}}/v2/data-trend HTTP/1.1
X-Api-Key: {{read-write-token}}
Content-Type: application/json
{
"assetId": 64609,
"subtype": "input",
"data": {
"Counter": 678
},
"timestamp": "2025-03-25T13:13:14.000Z",
"clientReference": "ABC123"
}