کانالها
GET
/api/v1/channel_archive_types فهرست صفحهبندیشدهٔ کانالهای مرتبط با یک نوع دستگاه اندازهگیری را بازمیگرداند.
پارامترهای پرسوجو
equipment_type_id integer شناسهٔ نوع پیکربندی دستگاه اندازهگیری که کانالها بر اساس آن دریافت میشوند.
page integer شمارهٔ صفحه.
فیلدهای پاسخ
| ویژگی | توضیح |
|---|---|
equipment_type_id | شناسهٔ نوع پیکربندی دستگاه اندازهگیری (کلید یکتا) در سامانه |
archive_type_name | نام نوع آرشیو |
archive_type_varname | کد نوع آرشیو |
telemetry_type_name | نام نوع تلهمتری |
channel_name | نام کانال |
channel_varname | کد کانال |
unit_name | واحد اندازهگیری |
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/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);پاسخ
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
} آخرین بهروزرسانی در
آیا این صفحه مفید بود؟
از بازخورد شما سپاسگزاریم!
انواع دستگاه اندازهگیری
قبلی
پیکربندی
بعدی