Есепке алу торабын алу
GET
/api/v1/stations/:id Ресурс жеткізушінің бір есепке алу торабын оның идентификаторы бойынша қайтарады.
Жол параметрлері
id integer міндетті Есепке алу торабының идентификаторы.
Жауап Есепке алу тораптарының тізімі бөліміндегі
өрістердің дәл өзін қамтиды, олар data ішінде жалғыз объект түрінде қайтарылады.
Сұрау
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/91"js
const res = await fetch('https://api.vadsro.eu/api/v1/stations/91', {
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/91",
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/91", 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/91");
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": 91,
"name": "Example Beverages Production GmbH",
"equipment_type_id": 7,
"equipment_type_varname": "Type-J",
"equipment_brand_name": "Omega ETK R GSM",
"phone": "+49-30-5550101",
"equipment_id": 134,
"telemetry_id": 85,
"customer_id": 83,
"equipment_serial_number": "0000014",
"status_name_value": null,
"volume_value": "5.34",
"volume_unit": "m³",
"pressure_value": null,
"pressure_unit": "",
"temperature_value": "20.12",
"temperature_unit": "°C",
"last_seance_event_time": "1627801534",
"uid": "1234567891"
}
} Соңғы жаңарту
Бұл бет пайдалы болды ма?
Пікіріңіз үшін рақмет!
Есепке алу тораптарының тізімі
Артқа
Нысанның сипаттамаларын алу
Келесі