Нысанның сипаттамаларын алу
GET
/api/v1/stations/:id/characteristics Есепке алу торабының физикалық сипаттамаларын оның идентификаторы бойынша қайтарады.
Жол параметрлері
id integer міндетті Есепке алу торабының идентификаторы.
Жауап өрістері
| Атрибут | Сипаттама |
|---|---|
id | Жүйедегі есепке алу торабының идентификаторы (бірегей кілті) |
gas_boiler | Газ қазандығының болуы |
gas_stove | Газ плитасының болуы |
gas_water_heater | Газ су жылытқышының болуы |
resident_count | Тұрғындар саны (адам) |
heated_area | Жылытылатын алаң (m²) |
Сұрау
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/stations/3318/characteristics"js
const res = await fetch('https://api.vadsro.eu/api/v1/stations/3318/characteristics', {
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/stations/3318/characteristics",
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/stations/3318/characteristics", 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/stations/3318/characteristics");
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": 3318,
"gas_boiler": "false",
"gas_stove": "false",
"gas_water_heater": "true",
"resident_count": "22",
"heated_area": null
}
} Соңғы жаңарту
Бұл бет пайдалы болды ма?
Пікіріңіз үшін рақмет!
Есепке алу торабын алу
Артқа
Соңғы байланыс сеансының күнін алу
Келесі