API Endpoints
The Laravel backend API server provides unified, module agnostic access points organized by data/action requested.
The server authenticates and validates the requests and directs them to the appropriate controls which in turn send them to the appropriate services. Http responses are sent back to the browser.
Endpoints loosely follow the the CRUD standard, with the addition of the init(), page(), sync() and media related operations:
app/init() app-wide initialization (S3 bucket details, accessibility configurations, etc.)
module/init() returns the module-specific Trio (Categories/Groups/Option) data structure definitions to be stored on the frontend, in addition to some statistics, texts, and other metadata.
module/index() returns a collection of (unique) item names according to the given filter parameters. This collection is referred to as “main” in the frontend.
module/page() receives a list of names (a subarray of one of the frontend collections) and returns the result page array, according to the requested view:
Gallery:array of objects containig urls to the item’s first related media, along with a short description. The "short" retrieval function definitions are located in shortQuery() & shortFormat() in each module-specific configuration files.Tabular:array of objects used to show items a tabular form. The "tabular" retrieval function definitions are located in tabularPageQuery() and tabularPageFormat() in each module-specifig configuration file.
The paging system limits the amount of data loaded to the frontend.
item.show() returns an item with its related data. These include:
fields:The item's record retrieved from the DBmodule_tags:Array of related tag IDsglobal_tags:Array of related global tag IDsonps:Array of related optional numeric properties and their valuesmedia:Array of related media IDsrelated:Array of related items (Module+Name) + relation name
carousel() returns details of an item to be displayed in a "carousel" (media) form. Three carousel forms are available, dependent on the collection source:
main:displays the item's "name" and a short description in addition to related media (if available).media:displays information about specific item-related media.related:displays a related item's name and short description in addition to related media (if available) and relation details.
The mutation API endpoints are self-explanatory.