Типы приборов учёта
GET
/api/v1/equipment_types Возвращает постраничный список типов приборов учёта.
Параметры запроса
page integer Номер страницы.
Поля ответа
| Атрибут | Описание |
|---|---|
id | Идентификатор (уникальный ключ) потребителя в системе |
name | Наименование типа прибора учёта |
equipment_kind_name | Наименование типа прибора учёта |
telemetry_type_name | Наименование типа телеметрии |
resource_name | Энергоресурс |
description | Описание |
total_pages | Общее количество страниц в возвращаемой выборке |
current_page | Текущая страница |
next_page | Следующая страница, доступная для загрузки; null, если текущая страница последняя |
Запрос
bash
curl -i \
--header "access-token: *********************" \
--header "token-type: Bearer" \
--header "client: **********************" \
--header "uid: api-user@example.com" \
--header "Content-Type: application/json" \
--request GET \
"https://api.vadsro.eu/api/v1/equipment_types?page=1"js
const res = await fetch('https://api.vadsro.eu/api/v1/equipment_types?page=1', {
headers: {
'access-token': '*********************',
'token-type': 'Bearer',
client: '**********************',
uid: 'api-user@example.com',
'Content-Type': 'application/json',
},
});
const data = await res.json();python
import requests
res = requests.get(
"https://api.vadsro.eu/api/v1/equipment_types",
params={"page": 1},
headers={
"access-token": "*********************",
"token-type": "Bearer",
"client": "**********************",
"uid": "api-user@example.com",
"Content-Type": "application/json",
},
)
data = res.json()go
req, _ := http.NewRequest("GET", "https://api.vadsro.eu/api/v1/equipment_types?page=1", nil)
req.Header.Set("access-token", "*********************")
req.Header.Set("token-type", "Bearer")
req.Header.Set("client", "**********************")
req.Header.Set("uid", "api-user@example.com")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)php
$ch = curl_init("https://api.vadsro.eu/api/v1/equipment_types?page=1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"access-token: *********************",
"token-type: Bearer",
"client: **********************",
"uid: api-user@example.com",
"Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);Ответ
json
{
"data": [
{
"id": 1,
"name": "BK",
"equipment_kind_name": "Corrector",
"telemetry_type_name": "vdTel-1",
"resource_name": "Gas",
"description": "Gas volume corrector BK"
}
],
"total_pages": 1,
"current_page": 1,
"next_page": null
} Последнее обновление
Эта страница была полезной?
Спасибо за ваш отзыв!
Справочники
Назад
Каналы
Далее