التكوين
GET
/api/v1/channel_data تُعيد قائمة مقسَّمة إلى صفحات بتكوين جهاز القياس.
معاملات الطلب
archive_type string مطلوب نوع الأرشيف. وللتكوين تكون قيمته settings.
equipment_id integer معرّف جهاز القياس الذي تُستخرَج البيانات عنه.
page integer رقم الصفحة.
حقول الاستجابة
| السمة | الوصف |
|---|---|
channel_name | اسم التكوين |
channel_data_value | قيمة التكوين |
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_data?archive_type=settings&equipment_id=25&page=1"js
const res = await fetch(
'https://api.vadsro.eu/api/v1/channel_data?archive_type=settings&equipment_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_data",
params={"archive_type": "settings", "equipment_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_data?archive_type=settings&equipment_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_data?archive_type=settings&equipment_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": [
{
"channel_name": "Presence of ambient temperature sensor (1 – sensor installed, 0 – sensor absent)",
"channel_data_value": "0",
"unit_name": null
}
],
"total_pages": 1,
"current_page": 1,
"next_page": null
} آخر تحديث في
هل كانت هذه الصفحة مفيدة؟
شكرًا على ملاحظاتك!
القنوات
السابق
إجراء استخراج البيانات
التالي