Channels
GET
/api/v1/channel_archive_types Returns a paged list of channels linked to a meter type.
Query parameters
equipment_type_id integer Identifier of the metering device configuration type, according to which channels are unloaded.
page integer Page number.
Response fields
| Attribute | Description |
|---|---|
equipment_type_id | Identifier of the metering device configuration type (unique key) in the system |
archive_type_name | Archive type name |
archive_type_varname | Archive type code |
telemetry_type_name | Telemetry type name |
channel_name | Channel name |
channel_varname | Channel code |
unit_name | Unit of measurement |
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_archive_types?equipment_type_id=25&page=1"js
const res = await fetch(
'https://uztgs.uz/api/v1/channel_archive_types?equipment_type_id=25&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_archive_types",
params={"equipment_type_id": 25, "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_archive_types?equipment_type_id=25&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_archive_types?equipment_type_id=25&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": [
{
"equipment_type_id": 2,
"archive_type_name": "Daily readings archive",
"archive_type_varname": "daily",
"channel_name": "Average pressure",
"channel_varname": "P",
"unit_name": "kPа"
}
],
"total_pages": 4,
"current_page": 1,
"next_page": 2
} آخرین بهروزرسانی در
آیا این صفحه مفید بود؟
از بازخورد شما سپاسگزاریم!
Meter types
قبلی
Configuration
بعدی