orion/cmd/server/jsonrpc/testdata/test_rest.rest

104 lines
2.3 KiB
ReStructuredText

POST http://192.168.100.1:8888/rpc HTTP/1.1
content-type: application/json
{
"id": 0,
"method": "Orion.OwrtListWifiDevices",
"params": []
}
###
POST http://192.168.100.1:8888/rpc HTTP/1.1
content-type: application/json
{
"id": 1,
"method": "Orion.OwrtCreateWifiInterface",
"params": [ {
"Iface": {
"Name": "PyxisNetwork",
"Network": "lan",
"Index": 0,
"Ssid": "Pyxis",
"SysDevName": "wlan0",
"Encryption": "psk2",
"Key": "A2Z3E4R5T6Y7U",
"Device": "radio0",
"DevicePath": "soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0",
"Mode": "ap"
},
"Cleanup": true
}
]
}
###
POST http://192.168.100.1:8888/rpc HTTP/1.1
content-type: application/json
{
"id": 1,
"method": "Orion.OwrtCreateWifiInterface",
"params": [ {
"Iface": {
"Name": "PyxisClient",
"Index": 1,
"SysDevName": "wlan1",
"Device": "radio1",
"DevicePath": "soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0",
"Mode": "sta"
},
"Cleanup": false
}]
}
###
POST http://192.168.100.1:8888/rpc HTTP/1.1
content-type: application/json
{
"id": 1,
"method": "Orion.UpdateOrionBox",
"params": [ {
"Box": {
"Address": "",
"NewAddress": "",
"Security": "",
"SSID" : "reach:2a:03",
"WifiKey": "emlidreach"
},
"Server": {
"Address": "",
"SSID": "Pyxis",
"Security": "",
"WifiKey": "A2Z3E4R5T6Y7U",
"ClientIface" : {
"Name": "PyxisClient",
"Index": 1,
"SysDevName": "wlan1",
"Device": "radio1",
"DevicePath": "soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0",
"Mode": "sta"
}
}
} ]
}
###
POST http://192.168.100.1:8888/rpc HTTP/1.1
content-type: application/json
{
"id": 1,
"method": "Orion.ConfigureOrionBox",
"params": [ {
"Box": {
"Address": "",
"NewAddress": "",
"Security": "",
"SSID" : "reach:2a:03",
"WifiKey": "emlidreach"
}
} ]
}