List device messages
GET
/api/v1/message_equipment_types Returns a paged list of messages (event/error codes) linked to metering device types and archive types.
Query parameters
id integer Metering unit identifier. Optional.
equipment_type_id integer Metering device type identifier. Optional (filter by equipment type).
archive_type_id integer Archive type identifier. Optional (filter by archive type).
page integer Page number.
per_page integer Number of records per page (default determined by the system).
Response fields
| Attribute | Description |
|---|---|
id | Identifier (unique key) of the message in the system |
name | Message name |
description | Message description |
device_code | Device message code |
equipment_type_id | Identifier of the metering device configuration type (corrector configuration type key) |
equipment_type_varname | String unique identifier of the metering device configuration type |
referenceparameter_archive_type_id | Archive type identifier |
archive_type_varname | String unique identifier of the archive type |
message_typical_id | Typical message identifier |
channel_id | Channel identifier (unique key), null if not bound to a channel |
channel_varname | Channel string identifier, null if not bound to a channel |
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/message_equipment_types?equipment_type_id=11&page=1"js
const res = await fetch(
'https://uztgs.uz/api/v1/message_equipment_types?equipment_type_id=11&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/message_equipment_types",
params={"equipment_type_id": 11, "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/message_equipment_types?equipment_type_id=11&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/message_equipment_types?equipment_type_id=11&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": [
{
"id": 1,
"name": "Accumulated volume",
"description": "Scheduled communication",
"device_code": "0",
"equipment_type_id": 11,
"equipment_type_varname": "EK-270",
"referenceparameter_archive_type_id": 25,
"archive_type_varname": "nesht",
"message_typical_id": 2,
"channel_id": null,
"channel_varname": null
}
],
"total_pages": 5,
"current_page": 1,
"next_page": 2
} Соңғы жаңарту
Бұл бет пайдалы болды ма?
Пікіріңіз үшін рақмет!
Event archives
Артқа
Retrieve a device message
Келесі