ioBroker / ioBroker.rest-api

Swagger UI for ioBroker
Apache License 2.0
12 stars 8 forks source link
iobroker rest-api smarthome swagger-ui

Logo

REST-API adapter

Number of Installations Number of Installations NPM version Downloads Tests

NPM

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! Sentry reporting is used starting with js-controller 3.0.

This is a RESTFul interface to read the objects and states from ioBroker and to write/control the states over HTTP Get/Post requests.

The purpose of this adapter is similar to simple-api. But this adapter supports long-polling and URL hooks for subscribes.

It has a beneficial web interface to play with the requests:

Screenshot

Usage

Call in browser http://ipaddress:8093/ and use Swagger UI to request and modify the states and objects.

Some request examples:

Subscribe to the state's or object's changes

Your application could get notifications by every change of the state or object.

For that, your application must provide an HTTP(S) end-point to accept the updates.

Example in node.js see here demoNodeClient.js

Long polling

This adapter supports a subscribing on data changes via long polling.

Example for browser could be found here: demoNodeClient.js

Web extension

This adapter can run as a web extension. In this case, the path is available under http://iipaddress:8082/rest

Notice

Commands

Additionally, you can execute many socket commands via special interface:

http://ipaddress:8093/v1/command/<commandName>?arg1=Value2&arg2=Value2

E.g.

You can request all commands with POST method too. As body must be an object with parameters. E.g.:

curl --location --request POST 'http://ipaddress:8093/v1/command/sendTo' \
--header 'Content-Type: application/json' \
--data-raw '{
"adapterInstance": "history.0",
"command": "getHistory",
"message": {"id": "system.adapter.admin.0.memRss","options": {"aggregate": "onchange", "addId": true}}
}'

You cannot send POST request to commands via GUI.

States

Objects

Files

Admins

Others

Changelog

2.0.3 (2024-07-13)

2.0.1 (2024-05-23)

1.1.0 (2023-05-03)

1.0.5 (2023-03-27)

1.0.4 (2022-08-31)

1.0.2 (2022-07-27)

1.0.1 (2022-07-27)

1.0.0 (2022-05-19)

0.6.0 (2022-05-18)

0.5.0 (2022-05-17)

0.4.0 (2022-04-26)

0.3.6 (2022-04-22)

0.3.5 (2022-04-22)

0.3.4 (2022-04-20)

0.3.1 (2022-04-15)

0.1.0 (2017-09-14)

License

Apache 2.0

Copyright (c) 2017-2024 bluefox dogafox@gmail.com