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:setup.lua

From BoxMatrix
(Redirected from setup.lua)


BoxMatrix >> Webinterface >> setup.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 REST-API Lua-Scripts Javascript Browser SSI-Files SSI-Directives HTML-Text Event-Text Help-Pages CSS-Files Graphics Research

RESTAPI-Script

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

Details

setup.lua is the REST-API Plugin for dispatching Setup-Plugins.

It is auto-included by api.lua, like all /usr/rest_api/plugins/*.lua scripts.

It conditionally calls functions in Setup-Plugins, located in /usr/rest_api/plugins/setup/*.lua.

Supported functions in fw 8.00:

GET /api/v0/setup                               # calls privacy.lua -> dataCollection()
                                                #     + wifi.lua -> credentials()
                                                #     + myfritz.lua -> email()+enabled()
                                                #     + internet.lua ->  configurations()
                                                #     + phone_numbers.lua -> readPhoneNumbers()
                                                #     + locale.lua -> supportedList()
                                                #     + internet.lua -> tariffs()
                                                #     + update.lua -> information()
                                                #     + phone_numbers.lua -> readSipProviders()

GET /api/v0/setup/status                        # calls locale.lua -> setupNeeded()
GET /api/v0/setup/supportedLocations            # calls locale.lua -> supportedList()
GET /api/v0/setup/supportedInternetProviders    # calls internet.lua -> tariffs()
GET /api/v0/setup/supportedSipProviders         # calls phone_numbers.lua -> readSipProviders()
GET /api/v0/setup/updateInformation             # calls update.lua -> information()
GET /api/v0/setup/location                      # calls locale.lua -> settings()
GET /api/v0/setup/configuration                 # calls privacy.lua -> dataCollection()
                                                #     + wifi.lua -> credentials()
                                                #     + myfritz.lua -> email()+enabled()
                                                #     + internet.lua -> configurations()
                                                #     + phone_numbers.lua -> readPhoneNumbers()
GET /api/v0/setup/configuration/internet        # calls internet.lua -> configurations()

PUT /api/v0/setup                               # calls not_implemented() - no putSetup() yet
PUT /api/v0/setup/location                      # calls locale.lua -> addSettings()
PUT /api/v0/setup/configuration                 # calls privacy.lua -> savesetAdvancedDataCollection()
                                                #     + myfritz.lua -> savesetEnable()
                                                #     + wifi.lua -> savesetCredentials()
                                                #     + update.lua -> triggerUpdateCheck()
                                                #     + internet.lua ->  savesetConfiguration()
PUT /api/v0/setup/configuration/internet/<uid>  # calls internet.lua -> savesetConfiguration()
PUT /api/v0/setup/updateInformation/startFirmwareUpdate # calls update.lua -> triggerUpdate()

REST-API:

Functions

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

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

# sends a rest api error
local function sendError(codeName, message)

# append an "internal" error with message "not implemented"
# Only used during development of this plugin
local function not_implemented()

# handler for GET "/setup/status"
local function getSetupStatus()

# handler for GET "/setup/location"
local function getLocation(_, request)

# handler for GET "/setup/supportedLocations"
local function getSupportedLocations()

# handler for GET "/setup/supportedInternetProviders"
local function getSupportedInternetProviders()

# handler for GET "/setup/configuration/internet"
local function getInternetConfigurations()

# handler for GET "/setup/updateInformation"
local function getSetupUpdateInformation()

# handler for PUT "/setup/configuration/internet/{UID}"
local function putInternetConfiguration(uid, request, body)

# handler for PUT "/setup/updateInformation/startFirmwareUpdate"
local function putUpdateInformation(_, request, body)

# handler for get "/setup/supportedSipProviders"
local function getSetupSupportedSipProviders()

# handler for GET "/setup/configuration"
local function getSetupConfiguration()

# handler for GET "/setup"
local function getSetup(_, request)

# handler for PUT "/setup/location"
local function putLocation(_, request, body)

# handler for PUT "/setup/configuration"
local function putSetupConfiguration(_, request, body)

# is box busy and would probably be down in a moment
# if update was started, during first 10-20 seconds is the box still available
# in this case we send
local function isBoxBusy()

# match the params of plugin.(get/put/post/delete)-data to path-handlers
local function match_path(method, request)

# handle all requests
local function handle(method, params, body)

# handles all GET-requests of the plugin
function plugin.get_data(params)

# handles all PUT-requests of the plugin
function plugin.put_data(params)

# handles all POST-requests of the plugin
function plugin.post_data(params)

# handles all DELETE-requests of the plugin
function plugin.delete_data(params) 

Dependencies

Daily updated index of all dependencies of this script. Last update: 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 rest config.lua (restapi) 25 7.70 - 8.00 TODO AVM
Requires rest internet.lua (restapi) 25 7.70 - 8.00 TODO AVM
Requires rest locale.lua 25 7.70 - 8.00 TODO AVM
Requires rest myfritz.lua (restapi) 25 7.70 - 8.00 TODO AVM
Requires rest phone_numbers.lua 25 7.70 - 8.00 TODO AVM
Requires rest privacy.lua 25 7.70 - 8.00 TODO AVM
Requires rest progress.lua 25 7.70 - 8.00 TODO AVM
Requires rest response.lua 25 7.70 - 8.00 REST-API Response API AVM
Requires rest rest_api_const.lua 25 7.70 - 8.00 REST-API Const Tables AVM
Requires rest saveset.lua 25 7.70 - 8.00 TODO AVM
Requires rest table.lua 25 7.70 - 8.00 REST-API common extension of the Lua table module AVM
Requires rest update.lua (restapi) 25 7.70 - 8.00 TODO AVM
Requires rest wifi.lua (restapi) 25 7.70 - 8.00 TODO AVM
13 dependencies for this script

Model-Matrix

Daily updated index of the presence, path and size of this script for each model. Last update: 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/rtl) label in the Model column shows which CPU is meant for Multi-Linux models.
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 4040 7.90 - 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 4050 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 4060 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 5530 Fiber (main) 7.70 - 8.00 /usr/rest_api/plugins 11.9k - 13.6k
FRITZ!Box 5590 Fiber (main) 7.70 - 8.00 /usr/rest_api/plugins 11.9k - 13.6k
FRITZ!Box 5590 Fiber (prx) 7.70 - 8.00 /usr/rest_api/plugins 11.9k - 13.6k
FRITZ!Box 6591 Cable (arm) 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 6591 Cable (atom) 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 6660 Cable (arm) 7.90 - 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 6660 Cable (atom) 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 6670 Cable (arm) 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 6670 Cable (atom) 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 6690 Cable (arm) 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 6690 Cable (atom) 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 6850 5G 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 6850 LTE 7.90 /usr/rest_api/plugins 13.6k
FRITZ!Box 7510 7.90 - 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 7520 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 7520 v2 (main) 7.90 - 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 7530 7.90 - 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 7530 AX 7.70 - 8.00 /usr/rest_api/plugins 12.7k - 13.6k
FRITZ!Box 7583 VDSL (main) 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 7590 (main) 7.90 - 8.00 /usr/rest_api/plugins 13.6k
FRITZ!Box 7590 AX (main) 7.70 - 8.00 /usr/rest_api/plugins 12.7k - 13.6k
FRITZ!Box 7690 7.90 /usr/rest_api/plugins 13.6k
25 models use this script

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

s