Kanály
GET
/api/v1/channel_archive_types Vrací stránkovaný seznam kanálů přiřazených k typu měřidla.
Parametry dotazu
equipment_type_id integer Identifikátor typu konfigurace měřicího zařízení, podle kterého se kanály načítají.
page integer Číslo stránky.
Pole odpovědi
| Atribut | Popis |
|---|---|
equipment_type_id | Identifikátor typu konfigurace měřicího zařízení (jedinečný klíč) v systému |
archive_type_name | Název typu archivu |
archive_type_varname | Kód typu archivu |
telemetry_type_name | Název typu telemetrie |
channel_name | Název kanálu |
channel_varname | Kód kanálu |
unit_name | Měrná jednotka |
total_pages | Celkový počet stránek ve vrácené sadě |
current_page | Aktuální stránka |
next_page | Další stránka dostupná ke stažení, null, pokud je aktuální stránka poslední |
Požadavek
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/channel_archive_types?equipment_type_id=25&page=1"js
const res = await fetch(
'https://api.vadsro.eu/api/v1/channel_archive_types?equipment_type_id=25&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/channel_archive_types",
params={"equipment_type_id": 25, "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/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", "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/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: api-user@example.com",
"Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);Odpověď
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": "kPa"
}
],
"total_pages": 4,
"current_page": 1,
"next_page": 2
} Naposledy aktualizováno
Byla tato stránka užitečná?
Děkujeme za vaši zpětnou vazbu!
Typy měřidel
Zpět
Konfigurace
Další