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:phonebook rest.lua

From BoxMatrix


BoxMatrix >> Webinterface >> phonebook_rest.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:   Functions  -  Dependencies   -   Model-Matrix   -   SMW-Browser

Details

This has been found in Labor, but did not make it to Release. It may be a test case or a future feature.

phonebook_rest.lua is the REST-API Module for the Phonebook.
It is loaded by rest_config.lua and provides the phonebook endpoint, which is accessible by:

GET    /api/v0/phonebook/books             # get the list of phonebooks
GET    /api/v0/phonebook/books/<string>    # get details of a single phone book
PUT    /api/v0/phonebook/books/<string>    # change details of a single phone book
DELETE /api/v0/phonebook/books/<string>    # delete a single phone book
POST   /api/v0/phonebook/books             # create a single phone book

GET    /api/v0/phonebook/books/<string>/entries           # get all entries of a single phone book
GET    /api/v0/phonebook/books/<string>/entries/<string>  # get a single entry of a phone book
PUT    /api/v0/phonebook/books/<string>/entries/<string>  # write a single entry to a phone book
DELETE /api/v0/phonebook/books/<string>/entries/<string>  # delete a single entry of a phone book
POST   /api/v0/phonebook/books/<string>/entries/<string>  # create a single entry of a phone book

POST   /api/v0/phonebook/books/<string>/bulk              # perform a function on multiple entries of a book

REST-API:

Functions

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

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

# Get faxjournal ressources.
function phonebook_rest.getRestRessources(rootPath)

# Helper function to check if the phonebook lua lib is loaded.
local function assert_phonebook()

# Handler function to send a list of phone books details to the client.
# GET /api/v0/phonebook/books
function phonebook_rest.get_books()

# Search a list of objects for an object with a given UID.
local function get_entry_with_uid(entries, uid)

# Handler function to send details of a single phone book to the client.
# GET /api/v0/phonebook/books/<string>
function phonebook_rest.get_book(params)

# Handler function to change details of a single phone book.
# PUT /api/v0/phonebook/books/<string>
function phonebook_rest.put_book(params)

# Handler function to delete a single phone book.
# DELETE /api/v0/phonebook/books/<string>
function phonebook_rest.delete_book(params)

# Handler function to create a single phone book.
# POST /api/v0/phonebook/books
function phonebook_rest.create_book()

# Handler function to send all entries of a single phone book to the client.
# GET /api/v0/phonebook/books/<string>/entries
function phonebook_rest.get_entries(params)

# Handler function to send a single entry of a phone book to the client.
# GET /api/v0/phonebook/books/<string>/entries/<string>
function phonebook_rest.get_entry(params)

# Handler function to write a single entry of a phone book.
# PUT /api/v0/phonebook/books/<string>/entries/<string>
function phonebook_rest.put_entry(params)

# Handler function to delete a single entry of a phone book.
# DELETE /api/v0/phonebook/books/<string>/entries/<string>
function phonebook_rest.delete_entry(params)

# Handler function to create a single entry of a phone book.
# POST /api/v0/phonebook/books/<string>/entries/<string>
function phonebook_rest.create_entry(params)

# Handler function to perform a selected function across multiple entries of a book
# POST /api/v0/phonebook/books/<string>/bulk
function phonebook_rest.bulk_entries(params)

Not listed in the Dependencies: This loads the libphonebooklua.so library.

Dependencies

Daily updated index of all dependencies of this script. Last update: 2024-04-26 08:50 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 19 7.39 - 7.90 REST-API Response API AVM
Requires lua rest_api_const.lua 19 7.39 - 7.90 REST-API Const Tables AVM
Includes js box.js 19 7.39 - 7.90 TODO AVM
3 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-26 06:23 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 5530 Fiber (main) 7.70 - 7.80 /usr/rest_api 12.9k
FRITZ!Box 5590 Fiber (arm) 7.70 - 7.90 /usr/rest_api 12.9k
FRITZ!Box 5590 Fiber (prx) 7.70 - 7.90 /usr/rest_api 12.9k
FRITZ!Box 6591 Cable (arm) 7.39 /usr/rest_api 12.9k
FRITZ!Box 6591 Cable (atom) 7.39 /usr/rest_api 12.9k
FRITZ!Box 6660 Cable (arm) 7.39 /usr/rest_api 12.9k
FRITZ!Box 6660 Cable (atom) 7.39 /usr/rest_api 12.9k
FRITZ!Box 6690 Cable (arm) 7.39 /usr/rest_api 12.9k
FRITZ!Box 6690 Cable (atom) 7.39 /usr/rest_api 12.9k
FRITZ!Box 6850 LTE 7.90 /usr/rest_api 12.9k
FRITZ!Box 6850 5G 7.90 /usr/rest_api 12.9k
FRITZ!Box 6890 LTE 7.39 /usr/rest_api 12.9k
FRITZ!Box 6890 LTE v1 7.39 /usr/rest_api 12.9k
FRITZ!Box 6890 LTE v2 7.39 /usr/rest_api 12.9k
FRITZ!Box 7530 7.39 /usr/rest_api 12.9k
FRITZ!Box 7530 AX 7.70 - 7.90 /usr/rest_api 12.9k
FRITZ!Box 7590 7.39 - 7.90 /usr/rest_api 12.9k
FRITZ!Box 7590 AX 7.39 - 7.90 /usr/rest_api 12.9k
FRITZ!Repeater 2400 7.39 /usr/rest_api 12.9k
19 models use this script

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

p