forked from rithvikvibhu/GHLocalApi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
connectivity.apib
67 lines (51 loc) · 1.61 KB
/
connectivity.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Group Connectivity
Everything related to Wifi and Bluetooth
## Get configured networks [/setup/configured_networks]
Get a list of all saved WiFi networks (no passwords obviously)
### Get configured networks [GET]
+ Request
+ Response 200 (application/json)
[
{
"ssid": "Wifi name",
"wpa_auth": 7,
"wpa_cipher": 4,
"wpa_id": 0
},
...
]
## Connect to Wifi [/setup/connect_wifi]
Connect to a new wifi network.
### Connect to Wifi [GET]
Not tested
## Get bluetooth bonded devices [/setup/bluetooth/get_bonded]
Get a list of all paired bluetooth devices.
### Get bluetooth bonded devices [GET]
+ Request
+ Response 200 (application/json)
[
{
"bond_date": 1503212407260.55,
"device_class": 5898764,
"device_type": 1,
"last_connect_date": 1514807829482.111,
"mac_address": "xx: xx: xx: xx: xx: xx",
"name": "Device Name",
"rssi": -255,
"service_uuids": [
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
...
]
}
]
## Set bluetooth discoverable [/setup/bluetooth/discovery]
Temporarily turn on bluetooth discoveribility. Used to connect new devices.
### Set bluetooth discoverable [POST]
+ Request (application/json)
{ "enable_discovery": true }
+ Response 200
## Connect bluetooth device [/setup/bluetooth/connect]
Connect a new bluetooth device.
### Connect bluetooth device [POST]
Not tested