Changes
Page history
Update User Terminal
authored
Apr 13, 2020
by
Jan Janak
Show whitespace changes
Inline
Side-by-side
API/User-Terminal.md
View page @
271a01b4
...
...
@@ -54,3 +54,35 @@ To test connectivity to the user terminal, the client can send a HTTP GET reques
curl http://<
hostname
>
:<port>/api/ping
```
The terminal responds with a 200 OK immediately.
# Platform Information
Send a HTTP GET request to the API endpoint to '/api/platform' to obtain a description of the terminal's hardware and software:
```
sh
curl http://<
hostname
>
:<port>/api/platform
```
```
json
{
"model"
:
"Raspberry Pi 3 Model B Rev 1.2"
,
"revision"
:
"a02082"
,
"serial"
:
"0000000021ff3c51"
,
"mac"
:
"b8:27:eb:ff:3c:51"
,
"machine_id"
:
"f3634215389b4bf3b457029175df780a"
,
"boot_id"
:
"15452b07-3ad8-41f2-9b3a-2ade8d43d01f"
,
"uptime"
:
406.03
,
"kernel"
:
"Linux version 4.19.97-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1294 SMP Thu Jan 30 13:15:58 GMT 2020"
,
"os_release"
:
"Raspbian GNU/Linux 10 (buster)"
,
"nodejs"
:
"v13.11.0"
}
```
The meaning of the attributes is as follows:
*
**model**
- Raspberry Pi hardware model the terminal is running on
*
**revision**
- Raspberry Pi hardware revision string
*
**serial**
- The serial number of the Raspberry Pi
*
**mac**
- The hardware address of the Ethernet interface
*
**machine_id **
- The persistent unique ID of the OS installation, generated on first boot
*
**boot_id**
- The unique ID of the terminal's current boot session
*
**uptime**
- The number of seconds since the user terminal started
*
**kernel**
- The Linux kernel version and build information
*
**os_release**
- Raspbian version
*
**nodejs**
- NodeJS version running the terminal control program