If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:rest config.lua

From BoxMatrix


BoxMatrix >> Webinterface >> rest_config.lua @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

UI-Structure UI-Modules HTML-Files XML-Files Lua-Scripts Javascript Browser SSI-Files SSI-Directives HTML-Text Event-Text Help-Pages CSS-Files Graphics Research

Lua-Script

Goto:   Modules  -  Functions  -  Dependencies   -   Model-Matrix   -   SMW-Browser

Details

rest_config.lua is the REST-API Module Loader. It is included by api.lua.

It loads all Modules, each of which represents one or more custom endpoints.

Each REST-API Module provides a endPointNames table containing all endpoints which should be listed in the overview,
and a getRestRessources method, which returns a ressource table with handler function pointers for all supported
endpoints, request methods and pathes.

Although all modules are polymorph they are not loaded by wildcard, Each module is loaded separately by the
load_rest_module function, permitting to tweak their parameters.

rest_config.lua provides the 2 collected and merged tables by getEndpoints and getRestRessources,
which could be handled in api.lua like loading a single module.

REST-API:

Modules

8 modules were tested in early fw 7.39, but only 2 of them made it to release 7.50. This likely changes again.

This is a subset of the Lua-Scripts section, filtered for all *_rest.lua files in /usr/rest_api,
including the demo module obl_fboxname.lua:

Daily updated index of all lua scripts found scanning Firmware-Probes . Last update: 2024-04-19 06:26 GMT.
The label (static) in the Script column shows there are other objects in this wiki using this name.
The Mod column shows the amount of models using the respective script. Click the column header to sort by this number.

Functions

The function names of scripts often help to understand function blocks (and show gaps in the docs). fw 7.50 functions:

$ grep -e '^function' -e '^local function' /usr/rest_api/rest_config.lua

local function configConcat(configTab, configPartTab)
local function getOblOverview(path)

# debug to /dev/console
function mydbg(txt, data)

# todo
function load_rest_module(luaFile, rootPath, endPointConfigs, overViewTable)

# todo
function restConfig.getRestRessources(rootPath)

# todo
function restConfig.getEndpoints() 

Dependencies

Daily updated index of all dependencies of this script. Last update: 2024-04-19 08:52 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.
If an Object includes itself then this is a file with the same name but another Path and the dependencies are merged.

Relation Typ Object Mod Firmware Info Origin
Requires lua response.lua 51 7.39 - 7.90 REST-API Response API AVM
Required by lua api.lua 50 7.39 - 7.90 REST-API Lua-Land root for scgi_server AVM
2 dependencies for this script

Model-Matrix

Daily updated index of the presence, path and size of this script for each model. Last update: 2024-04-19 06:26 GMT.
Showing all models using this script. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size/Bytes
FRITZ!Box 4020 7.39 /usr/rest_api 3.9k
FRITZ!Box 4040 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 4050 7.57 /usr/rest_api 3.9k
FRITZ!Box 4060 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 5530 Fiber (main) 7.39 - 7.80 /usr/rest_api 3.9k
FRITZ!Box 5590 Fiber (arm) 7.39 - 7.90 /usr/rest_api 2.9k - 3.9k
FRITZ!Box 5590 Fiber (prx) 7.70 - 7.90 /usr/rest_api 2.9k - 3.9k
FRITZ!Box 5690 Pro (arm) 7.59 /usr/rest_api 3.9k
FRITZ!Box 6430 Cable (arm) 7.57 /usr/rest_api 3.9k
FRITZ!Box 6490 Cable (arm) 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 6490 Cable (atom) 7.39 - 7.51 /usr/rest_api 3.9k
FRITZ!Box 6590 Cable (arm) 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 6590 Cable (atom) 7.39 - 7.51 /usr/rest_api 3.9k
FRITZ!Box 6591 Cable (arm) 7.39 - 7.57 /usr/rest_api 3.8k - 4.0k
FRITZ!Box 6591 Cable (atom) 7.39 - 7.57 /usr/rest_api 3.8k - 4.0k
FRITZ!Box 6660 Cable (arm) 7.39 - 7.57 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 6660 Cable (atom) 7.39 - 7.57 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 6670 Cable (arm) 7.57 - 7.62 /usr/rest_api 3.9k
FRITZ!Box 6670 Cable (atom) 7.61 - 7.62 /usr/rest_api 3.9k
FRITZ!Box 6690 Cable (arm) 7.39 - 7.57 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 6690 Cable (atom) 7.39 - 7.57 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 6820 LTE v1 7.39 - 7.51 /usr/rest_api 3.9k
FRITZ!Box 6820 LTE v2 7.39 - 7.51 /usr/rest_api 3.9k
FRITZ!Box 6820 LTE v3 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 6840 LTE 7.39 /usr/rest_api 3.9k
FRITZ!Box 6850 LTE 7.39 - 7.58 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 6850 5G 7.39 - 7.51 /usr/rest_api 3.9k
FRITZ!Box 6890 LTE 7.39 - 7.51 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 6890 LTE v1 7.39 - 7.51 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 6890 LTE v2 7.39 - 7.51 /usr/rest_api 3.9k - 4.0k
FRITZ!Box 7272 7.39 /usr/rest_api 3.9k
FRITZ!Box 7430 7.39 /usr/rest_api 3.9k
FRITZ!Box 7490 (main) 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 7510 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 7520 7.39 - 7.51 /usr/rest_api 3.9k
FRITZ!Box 7520 v2 (arm) 7.39 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 7530 7.39 - 7.56 /usr/rest_api 3.8k - 4.0k
FRITZ!Box 7530 AX 7.39 - 7.90 /usr/rest_api 2.9k - 4.0k
FRITZ!Box 7560 7.39 /usr/rest_api 3.9k
FRITZ!Box 7583 7.50 - 7.57 /usr/rest_api 3.9k
FRITZ!Box 7590 7.39 - 7.90 /usr/rest_api 2.9k - 4.0k
FRITZ!Box 7590 AX 7.39 - 7.90 /usr/rest_api 2.9k - 4.0k
FRITZ!Box 7690 7.59 /usr/rest_api 3.9k
FRITZ!Repeater 600 7.39 /usr/rest_api 3.9k
FRITZ!Repeater 1200 7.39 /usr/rest_api 3.9k
FRITZ!WLAN Repeater 1750E 7.39 /usr/rest_api 3.9k
FRITZ!Repeater 2400 7.39 /usr/rest_api 3.8k - 4.0k
FRITZ!Repeater 3000 7.39 /usr/rest_api 3.9k
FRITZ!Repeater 3000 AX 7.39 /usr/rest_api 3.9k
FRITZ!Powerline 1240 AX 7.51 - 7.57 /usr/rest_api 3.9k
FRITZ!Powerline 1260E 7.39 /usr/rest_api 3.9k
51 models use this script

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

r