Unified view
GET
/api/v1/channel_data Returns a list of metering unit readings by archive type and resource provider time interval in a unified form.
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.
channel_consolidation integer Set to 1 to unload the parameter in a unified form, if any.
Response fields
| Attribute | Description |
|---|---|
event_time | Date and time of meter readings in UTC format |
channel_data | Archive data. Unified channel names: gas_consume - standard gas volume for the period, reading_value - accumulated standard gas volume, VNakwork - accumulated working gas volume, Vwork - working gas volume, P - pressure, T - temperature |
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&channel_consolidation=1"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&channel_consolidation=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": "hourly",
"equipment_id": 25,
"fp_end": "2021-02-20",
"fp_start": "2021-02-01",
"page": 2,
"channel_consolidation": 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=hourly&equipment_id=25&fp_end=2021-02-20&fp_start=2021-02-01&page=2&channel_consolidation=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=hourly&equipment_id=25&fp_end=2021-02-20&fp_start=2021-02-01&page=2&channel_consolidation=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": 1631791097,
"channel_data": [
{ "gas_consume": "503.2795" },
{ "reading_value": "671893.9226" },
{ "VNakwork": "15402.9101" },
{ "Vwork": "15398" },
{ "P": "1.4" },
{ "T": "20" }
]
}
],
"total_pages": 1,
"current_page": 1,
"next_page": null
} Naposledy aktualizováno
Byla tato stránka užitečná?
Děkujeme za vaši zpětnou vazbu!
General view
Zpět
Events & messages
Další