General view
GET
/api/v1/channel_data Returns a list of metering unit readings broken down by archive type and resource provider time interval.
Query parameters
archive_type string Archive type for which data is being uploaded. For a list of archive types, see the table “Directory of archive types”.
equipment_id integer Metering device identifier for which data is being uploaded.
fp_start string Time interval (segment start) in yyyy-mm-dd format for which data is being uploaded.
fp_end string Time interval (segment end) in yyyy-mm-dd format for which data is being uploaded.
page integer Page number.
Response fields
| Attribute | Description |
|---|---|
event_time | Date and time of meter readings in UTC format |
channel_data | Archive data. The data depends on the parameters archive type and metering device corrector type. For a description of the parameter channels, see the table “Directory of metering unit channel parameters” |
data | Array of returned data |
total_pages | Total number of pages in the returned set |
current_page | Current page |
next_page | Next page available for downloading, null if the current page is the last one |
Request
bash
curl -i \
--header "access-token: *********************" \
--header "token-type: Bearer" \
--header "client: **********************" \
--header "uid: user@local.net" \
--header "Content-Type: application/json" \
--request GET \
"https://uztgs.uz/api/v1/channel_data?archive_type=hourly&equipment_id=25&fp_end=2021-02-20&fp_start=2021-02-01&page=2"js
const res = await fetch(
'https://uztgs.uz/api/v1/channel_data?archive_type=hourly&equipment_id=25&fp_end=2021-02-20&fp_start=2021-02-01&page=2',
{
headers: {
'access-token': '*********************',
'token-type': 'Bearer',
client: '**********************',
uid: 'user@local.net',
'Content-Type': 'application/json',
},
},
);
const data = await res.json();python
import requests
res = requests.get(
"https://uztgs.uz/api/v1/channel_data",
params={
"archive_type": "hourly",
"equipment_id": 25,
"fp_end": "2021-02-20",
"fp_start": "2021-02-01",
"page": 2,
},
headers={
"access-token": "*********************",
"token-type": "Bearer",
"client": "**********************",
"uid": "user@local.net",
"Content-Type": "application/json",
},
)
data = res.json()go
req, _ := http.NewRequest("GET", "https://uztgs.uz/api/v1/channel_data?archive_type=hourly&equipment_id=25&fp_end=2021-02-20&fp_start=2021-02-01&page=2", nil)
req.Header.Set("access-token", "*********************")
req.Header.Set("token-type", "Bearer")
req.Header.Set("client", "**********************")
req.Header.Set("uid", "user@local.net")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)php
$ch = curl_init("https://uztgs.uz/api/v1/channel_data?archive_type=hourly&equipment_id=25&fp_end=2021-02-20&fp_start=2021-02-01&page=2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"access-token: *********************",
"token-type: Bearer",
"client: **********************",
"uid: user@local.net",
"Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);Response
json
{
"data": [
{
"event_time": 1612292400,
"channel_data": [
{ "T": 25.193481 },
{ "VNakpriv": 89519.01 },
{ "VNakwork": 292537.06 },
{ "P": 0.9954071 }
] },
...,
{
"event_time": 1612288800,
"channel_data": [
{ "P": 0.995224 },
{ "VNakpriv": 89519.01 },
{ "VNakwork": 292537.06 },
{ "T": 25.103271 }
] }
],
"total_pages": 2,
"current_page": 1,
"next_page": 2
} آخر تحديث في
هل كانت هذه الصفحة مفيدة؟
شكرًا على ملاحظاتك!
Readings archives
السابق
Unified view
التالي