Event archives
GET
/api/v1/channel_data Returns the event archive for a metering device. It uses the same channel_data endpoint as readings, but with an event-type archive_type; the response contains event/message records (codes and descriptions) instead of numeric channels.
Query parameters
archive_type string required Event archive type. One of: nesht, nesht_svod, changes, event, alarm, valve,
seance.
equipment_id integer required Metering device identifier. Alternatively, the pair energy_varname + uid can be passed.
fp_start string Time interval (segment start), yyyy-mm-dd. Optional.
fp_end string Time interval (segment end), yyyy-mm-dd. Optional.
page integer Page number.
per_page integer Page size. Optional. Defaults to 10 for event archives.
Response fields
| Attribute | Description |
|---|---|
data[].event_time | Unix time of the event (seconds; milliseconds are appended as a fractional part) |
data[].channel_data | Array of single-key { varname: value } objects. *Description fields are enriched with texts from the message reference |
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=nesht&equipment_id=906&fp_start=2025-05-01&fp_end=2026-05-29&page=1"js
const res = await fetch(
'https://uztgs.uz/api/v1/channel_data?archive_type=nesht&equipment_id=906&fp_start=2025-05-01&fp_end=2026-05-29&page=1',
{
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": "nesht",
"equipment_id": 906,
"fp_start": "2025-05-01",
"fp_end": "2026-05-29",
"page": 1,
},
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=nesht&equipment_id=906&fp_start=2025-05-01&fp_end=2026-05-29&page=1", 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=nesht&equipment_id=906&fp_start=2025-05-01&fp_end=2026-05-29&page=1");
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": 1748476800.123,
"channel_data": [
{ "Code": "1" },
{ "CodeDescription": "Emergency situation: connection loss" },
{ "ValCode": "23.6" },
{ "Izm": "0" }
]
}
],
"total_pages": 5,
"current_page": 1,
"next_page": 2
} Последнее обновление
Эта страница была полезной?
Спасибо за ваш отзыв!
Events & messages
Назад
List device messages
Далее