This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/cmd/server/rpc/testdata/test_rest.rest

93 lines
2.2 KiB
ReStructuredText
Raw Normal View History

2018-10-11 11:35:51 +02:00
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": {
2018-10-17 15:32:01 +02:00
"Address": "",
"NewAddress": "",
2018-10-11 11:35:51 +02:00
"Security": "",
"SSID" : "reach:2a:03",
"WifiKey": "emlidreach"
},
"Server": {
2018-10-17 15:32:01 +02:00
"Address": "",
2018-10-11 11:35:51 +02:00
"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"
}
} ]
2018-10-11 11:35:51 +02:00
}