Материал из for iRidium developers
Перейти к: навигация, поиск
Эта страница является переводом страницы REST API. Перевод выполнен на 100%.

Other languages:
English • ‎русский

API iRidium. REST API

REST API describes communication with the Server core with the help of HTTPs requests. REST API allows you to form a custom web-page for exchanging data with the server


Request structure

HTTP://IP:PORT/TYPE/NAME/BIND/COMMAND?PARAM=VALUE

  • IP - the address of the web-interface of your server
  • PORT - the port on which the web-interface works
  • TYPE - the type of referring. The following types are available:
    • HTML - the referring as to a web-page
    • JSON - the referring as to a JSON packet
    • PLAIN - the use of API
  • NAME - the name of the page you have to refer to form the reply.
  • BIND - the API section containing the list of commands
  • COMMAND - the command of the selected API section
  • PARAM=VALUE - the properties of command execution, values for setting



Commands of the system menu

Command structure : https://127.0.0.1:8443/plain/api/systemmenu/<COMMAND>

  • TYPE: /plain/
  • NAME: /api/
  • BIND: /systemmenu/.../ several values
  • COMMAND: /.../ several values


The BIND list and corresponding COMMAND:


systemmenu

General information about the server
https://127.0.0.1:8443/plain/api/systemmenu/...

.../buildversion/get the build version
.../buildnumber/get the build number
.../builddate/get the build date
.../buildtime/get время сборки
.../hwid/get the server HWID
.../ip/get the server IP-address

Example:
https://127.0.0.1:8443/plain/api/systemmenu/hwid/get


systemmenu/server

Server name and model
https://127.0.0.1:8443/plain/api/systemmenu/server/...

.../name/get the server name
.../os/get the OS where the server is running
.../family/get the family
.../model/get the model

Example:
https://127.0.0.1:8443/plain/api/systemmenu/server/name/get


systemmenu/update

Update of server projects
https://127.0.0.1:8443/plain/api/systemmenu/update/...

.../host/get to get the IP-address from which the server project is updated
.../host/set?value=<host> to set up the IP-address from which the server project must be updated
.../port/get to get the port for the project update
.../port/set?value=<port> to set up the project update port

Example:
https://127.0.0.1:8443/plain/api/systemmenu/update/host/set?value=192.168.0.100

systemmenu/log

Logging of the server web-interface, drivers and scripts with the help of Syslog Server
https://127.0.0.1:8443/plain/api/systemmenu/log/...

.../systemmenu/log/host/get tp get the Syslog Server address for remote debugging
.../host/set?host=<host> to set up the Syslog Server address for remote debugging
.../port/get to get the Syslog Server port
.../port/set?port=<port> to set up the Syslog Server port
.../enabled/get the debugging mode, if it is activated - it will return the Syslog Server address, if it is deactivated - an empty field. To disable remote debugging, clear Host

Example:
https://127.0.0.1:8443/plain/api/systemmenu/log/host/set?host=192.168.0.100


systemmenu/log/level

Logging depth of the server web-interface, drivers and scripts with the help of Syslog Server
https://127.0.0.1:8443/plain/api/systemmenu/log/level/...

.../wmi/get the logging depth of the web-interface
.../wmi/set?value=<0...7> to set up the logging depth of the web-interface
.../db/get the logging depth of the database
.../db/set?value=<0...7> to set up the the logging depth of the database
.../script/get the logging depth of the scripts
.../script/set?value=<0...7> to set up the logging depth of the scripts

Example:
https://127.0.0.1:8443/plain/api/systemmenu/log/level/script/set?value=7


systemmenu/dir

Location of the directories where the server resources are stored
https://127.0.0.1:8443/plain/api/systemmenu/dir/...

.../doc/get the location of the folder with the server project
.../res/get the location of the folder with the server resources
.../db/get расположение папки с базой данных
.../logs/get the location of the folder with the logs

Example:
https://127.0.0.1:8443/plain/api/systemmenu/dir/logs/get


Driver commands

Command structure: https://127.0.0.1:8443/html/devices/<BIND>/<COMMAND>

  • TYPE: /html/
  • NAME: /devices/
  • BIND: /.../ several values
  • COMMAND: /.../ several values



The BIND list and corresponding COMMAND:


devices/device

Settings of the server project drivers
https://127.0.0.1:8443/html/devices/devices/device/...

.../host/get?name=<driver_name> to get the connection IP-address of the driver by its name
.../host/set?name=<driver_name>&host=<host> to set up IP the connection IP-address of the driver by its name
.../port/get?name=<driver_name> to get the connection port of the driver by its name
.../port/set?name=<driver_name>&port=<port> to set up the connection port of the driver by its name
.../login/get?name=<driver_name> получить логин подключения драйвера по имени
.../pwd/get?name=<driver_name> to get the connection password of the driver by its name
.../param/get?name=<driver_name> to get the connection pproperties of the driver by its name
.../online/get?name=<driver_name> to get the connection status of the driver by its name
.../bg/get?name=<driver_name> to get the BackGround Mode state of the driver by its name
.../logtag/get?name=<driver_name> to get the logging status of the driver by its name
.../loglevel/get?name=<driver_name> to get the logging level of the driver by its name
.../loglevel/set?name=<driver_name>&value=<0...7> to set up the logging level of the driver by its name
.../channels/get?name=<driver_name> to get the list of commands of the driver by its name
.../tags/get?name=<driver_name> to get the list of feedback channels of the driver by its name

Example:
https://127.0.0.1:8443/html/devices/devices/device/loglevel/set?name=KNX_BAOS_Server&value=0


license

Receiving information about the license
https://127.0.0.1:8443/html/devices/license/...

.../get to get information about the license

Example:
https://127.0.0.1:8443/html/devices/license/get


panels

Control of connected control panels
https://127.0.0.1:8443/html/devices/kick/...

.../set?name=<name> to disconnect the control panel from the server by its name
.../set?hwid=<HWID> to disconnect the control panel from the server by its HWID

Example:
https://127.0.0.1:8443/html/devices/kick/set?hwid=0f2c522a2879c0fe1d586911d431951


logs

Control of connected control panels
https://127.0.0.1:8443/html/devices/logs/...

.../filesizelimit/get to get the maximum size of the log file
.../filesizelimit/set?log_filesize_limit=<size> to set up the maximum size of the log file, Mb
.../dirs/get to get the directory of saving the log file
.../files/get to get the list of log files
.../lines/get
.../load/get
.../clear/set?ClearLog to clear the log

Example:
https://127.0.0.1:8443/html/devices/filesizelimit/get