„NUKI DEVELOPER | Nuki Bridge HTTP API“ ändern

2021-11-30 09:56:17 +01:00
parent 45720ee923
commit 46b701b1e2

@@ -187,4 +187,47 @@ Possible doorsensor states (used in Endpoints below).
<tr>
<th>Example-Response</th>
<td colspan="2">{"token": “token123”,"success": true}</td>
</table>
### /configAuth
<table>
<tr>
<th>URL</th>
<td colspan="2">http://192.168.1.50:8080/configAuth</td>
</tr>
<tr>
<th>Usage</th>
<td colspan="2">Enables or disables the authorization via /auth and the publication of the local IP and port to the discovery URL (https://api.nuki.io/discover/bridges).</td>
</tr>
<tr>
<th rowspan="2">URL-Parameters</th>
<th>enable</th>
<td>Flag (0 or 1) indicating whether or not the authorization should be enabled</td>
</tr>
<tr>
<th>token</th>
<td>The api token configured via the Nuki app when enabling the API</td>
</tr>
<tr>
<th rowspan="2">Response</th>
<td colspan="2">JSON list containing the success of the operation</td>
</tr>
<tr>
<th>success</th>
<td>Flag indicating the success of the authorization</td>
</tr>
<tr>
<th rowspan="2">Errors</th>
<th>HTTP 400</td>
<td>Returned if the given value for <b>enable</b> is invalid (neither 0 nor 1)</td>
</tr>
<tr>
<th>HTTP 401</th>
<td>Returned if the given <b>token</b> is invalid or a <b>hashed token</b> parameter is missing.</td>
</tr>
<tr>
<th>Example-Calls</th>
<td colspan="2">http://192.168.1.50:8080/configAuth?enable=0&token=123456
http://192.168.1.50:8080/configAuth?enable=0&ts=2019-03-05T01:06:53Z&rnr=4711&hash=f52eb5ce382e356c4239f8fb4d0a87402bb95b7b3124f0762b806ad7d0d01cb6</td>
</tr>
</table>