iobroker.rest-api 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/dist/lib/api/swagger/swagger.yaml +703 -757
- package/io-package.json +15 -2
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
[](https://nodei.co/npm/iobroker.rest-api/)
|
|
9
9
|
|
|
10
|
-
**This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
|
|
10
|
+
**This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting, see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
|
|
11
11
|
|
|
12
12
|
This is a RESTFul interface to read the objects and states from ioBroker and to write/control the states over HTTP Get/Post requests.
|
|
13
13
|
|
|
@@ -34,7 +34,7 @@ There are three types of authentication supported:
|
|
|
34
34
|
- Basic authentication
|
|
35
35
|
- OAuth2 (Bearer)
|
|
36
36
|
|
|
37
|
-
For authentication in query, you must set `user` and `pass` in query like:
|
|
37
|
+
For authentication in a query, you must set `user` and `pass` in query like:
|
|
38
38
|
```http
|
|
39
39
|
http://ipaddress:8093/v1/state/system.adapter.rest-api.0.memHeapTotal?user=admin&pass=admin
|
|
40
40
|
```
|
|
@@ -43,7 +43,7 @@ For basic authentication, you must set the `Authorization` header with the value
|
|
|
43
43
|
|
|
44
44
|
For Oauth2 authentication, you must set the `Authorization` header with the value `Bearer <AccessToken>`.
|
|
45
45
|
|
|
46
|
-
The access token
|
|
46
|
+
The access token can be retrieved with an HTTP request like:
|
|
47
47
|
```http
|
|
48
48
|
http://ipaddress:8093/oauth/token?grant_type=password&username=<user>&password=<password>&client_id=ioBroker
|
|
49
49
|
```
|
|
@@ -91,7 +91,7 @@ E.g.
|
|
|
91
91
|
- `http://ipaddress:8093/v1/command/extendObject?id=system.adapter.admin.0?obj={"common":{"enabled":true}}` - to restart admin
|
|
92
92
|
|
|
93
93
|
You can request all commands with POST method too. As body must be an object with parameters. E.g.:
|
|
94
|
-
```
|
|
94
|
+
```bash
|
|
95
95
|
curl --location --request POST 'http://ipaddress:8093/v1/command/sendTo' \
|
|
96
96
|
--header 'Content-Type: application/json' \
|
|
97
97
|
--data-raw '{
|
|
@@ -109,6 +109,8 @@ You cannot send POST request to commands via GUI.
|
|
|
109
109
|
- `getForeignStates(pattern)` - same as getStates
|
|
110
110
|
- `getState(id)` - get state value by ID
|
|
111
111
|
- `setState(id, state)` - set state value with JSON object (e.g. `{"val": 1, "ack": true}`)
|
|
112
|
+
- `getBinaryState(id)` - get binary state by ID
|
|
113
|
+
- `setBinaryState(id, base64)` - set binary state by ID
|
|
112
114
|
|
|
113
115
|
### Objects
|
|
114
116
|
- `getObject(id)` - get object by ID
|
|
@@ -180,7 +182,11 @@ You cannot send POST request to commands via GUI.
|
|
|
180
182
|
### **WORK IN PROGRESS**
|
|
181
183
|
-->
|
|
182
184
|
|
|
185
|
+
|
|
183
186
|
## Changelog
|
|
187
|
+
### 3.0.1 (2025-05-21)
|
|
188
|
+
* (@GermanBluefox) Corrected the web extension
|
|
189
|
+
|
|
184
190
|
### 3.0.0 (2025-04-27)
|
|
185
191
|
* (@GermanBluefox) Rewritten in TypeScript
|
|
186
192
|
* (@GermanBluefox) Removed binary states
|