„NUKI DEVELOPER | Nuki Bridge HTTP API“ ändern
parent
293de3a629
commit
d7664cca44
@ -154,3 +154,37 @@ Possible doorsensor states (used in Endpoints below).
|
|||||||
|
|
||||||
## 5. Endpoints
|
## 5. Endpoints
|
||||||
### /auth
|
### /auth
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>URL</th>
|
||||||
|
<td colspan="2">http://192.168.1.50:8080/auth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Usage</th>
|
||||||
|
<td colspan="2">Enables the api (if not yet enabled) and returns the api token. If no api token has yet been set, a new (random) one is generated. When issuing this API-call the bridge turns on its LED for 30 seconds. The button of the bridge has to be pressed within this timeframe. Otherwise the bridge returns a negative success and no token.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th rowspan="3">Response</th>
|
||||||
|
<td colspan="2">JSON list containing the success of the authorization</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>token</th>
|
||||||
|
<td>The api token</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>success</th>
|
||||||
|
<td>Flag indicating the success of the authorization</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Errors</th>
|
||||||
|
<th>HTTP 403</th>
|
||||||
|
<td>Returned if the authentication is disabled</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Example-Call</th>
|
||||||
|
<td colspan="2">http://192.168.1.50:8080/auth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Example-Response</th>
|
||||||
|
<td colspan="2">{ "token": “token123”,"success": true}</td>
|
||||||
|
</table>
|
Loading…
x
Reference in New Issue
Block a user