... | ... | @@ -11,6 +11,8 @@ |
|
|
* [3.5 Register CEMS](#register_cems)
|
|
|
* [3.6 Get all sensor values](#get_all_values)
|
|
|
* [3.7 Setup wifi of CEMS](#setup_wifi)
|
|
|
* [3.8 Set SSIDs for CEMS](#set_ssids)
|
|
|
* [3.9 Connect CEMS to user](#connect_cems)
|
|
|
|
|
|
___
|
|
|
|
... | ... | @@ -236,7 +238,7 @@ ___ |
|
|
### <a name="get_ssid"></a> 3.2 Get SSIDs of CEMS
|
|
|
A request to get all SSIDs of a certain CEMS. <br/>
|
|
|
**Note**<br/>
|
|
|
This request is currently not completly implemented! It returns a hardcoded list of SSIDs.
|
|
|
It is possible that the this request needs more time then a normal request, because it needs to wait for the responds of the CEMS.
|
|
|
|
|
|
**URL**
|
|
|
|
... | ... | @@ -564,9 +566,6 @@ __ |
|
|
### <a name="setup_wifi"></a> 3.7 Setup CEMS WiFi
|
|
|
Request to post all needed informations to setup the wifi of a CEMS.
|
|
|
|
|
|
**Note:**
|
|
|
The setup informations are currently not passed to the CEMS!
|
|
|
|
|
|
**URL**
|
|
|
|
|
|
`/api/v1/setup_cems_wifi`
|
... | ... | @@ -618,3 +617,129 @@ The setup informations are currently not passed to the CEMS! |
|
|
```json
|
|
|
"CEMS not found"
|
|
|
```
|
|
|
|
|
|
___
|
|
|
|
|
|
### <a name="set_ssids"></a> 3.8 Set SSIDs for CEMS
|
|
|
The CEMS can set the current SSIDs of itself.
|
|
|
|
|
|
**URL**
|
|
|
|
|
|
`/api/v1/set_ssids`
|
|
|
|
|
|
**Method:**
|
|
|
|
|
|
`POST`
|
|
|
|
|
|
**Scope:**
|
|
|
|
|
|
`cems_io`
|
|
|
|
|
|
**URL Params**
|
|
|
|
|
|
`None`
|
|
|
|
|
|
**Data Params**
|
|
|
* **Required:**
|
|
|
|
|
|
```javascript
|
|
|
wlans=[wlan[]]
|
|
|
//wlan is defined as a json with the following parameters:
|
|
|
wlan: {
|
|
|
type=[string]
|
|
|
ssid=[string]
|
|
|
password=[string]
|
|
|
}
|
|
|
```
|
|
|
**Note:**
|
|
|
|
|
|
Only the ssid part of the wlan is used.
|
|
|
|
|
|
**Success Response:**
|
|
|
* **Code:** 200 `SUCCESS`<br />
|
|
|
**Content:**
|
|
|
|
|
|
```json
|
|
|
[
|
|
|
"WiFi1",
|
|
|
"WiFi2",
|
|
|
"GuestWiFi"
|
|
|
]
|
|
|
```
|
|
|
|
|
|
**Error Response:**
|
|
|
|
|
|
* **Code:** 403 `FORBIDDEN` <br>
|
|
|
**Content:**
|
|
|
|
|
|
```json
|
|
|
"You dont have the permission for the request"
|
|
|
```
|
|
|
|
|
|
* **Code:** 404 `NOT FOUND` <br>
|
|
|
**Content:**
|
|
|
|
|
|
```json
|
|
|
"CEMS not found"
|
|
|
```
|
|
|
|
|
|
___
|
|
|
|
|
|
### <a name="connect_cems"></a> 3.9 Connect CEMS to user
|
|
|
With this request it is possible to add a sensor value to the database of the backend.
|
|
|
|
|
|
**URL**
|
|
|
|
|
|
`/api/v1/connect_cems`
|
|
|
|
|
|
**Method:**
|
|
|
|
|
|
`POST`
|
|
|
|
|
|
**Scope:**
|
|
|
|
|
|
`user`
|
|
|
|
|
|
**URL Params**
|
|
|
|
|
|
`None`
|
|
|
|
|
|
**Data Params**
|
|
|
* **Required:**
|
|
|
|
|
|
```javascript
|
|
|
cems_uid=[string]
|
|
|
```
|
|
|
|
|
|
**Success Response:**
|
|
|
* **Code:** 200 `SUCCESS`<br />
|
|
|
|
|
|
|
|
|
**Error Response:**
|
|
|
* **Code:** 400 `BAD REQUEST` <br>
|
|
|
**Content:**
|
|
|
|
|
|
```json
|
|
|
<error_message>
|
|
|
```
|
|
|
|
|
|
* **Code:** 403 `FORBIDDEN` <br>
|
|
|
**Content:**
|
|
|
|
|
|
```json
|
|
|
"You dont have the permission for the request"
|
|
|
```
|
|
|
|
|
|
* **Code:** 404 `NOT FOUND` <br>
|
|
|
**Content:**
|
|
|
|
|
|
```json
|
|
|
"CEMS not found"
|
|
|
```
|
|
|
|
|
|
* **Code:** 404 `NOT FOUND` <br>
|
|
|
**Content:**
|
|
|
|
|
|
```json
|
|
|
"User not found"
|
|
|
``` |