API Access Points
The Laravel back end API server provides unified, module-generic access points organized by module/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 mutations:
app/init() app-wide initialization. (S3 bucket details, accessibility details, etc)
model/init() returns the module-specific Trio (Categories/Groups/Option) data structure to be stored on the front end, in addition to some statistics, texts, and other metadata.
model/index() returns a collection of item IDs according to the given filter parameters. This collection is referred to as “main” in the front end.
model/page() receives a list of IDs (a subarray of one of the front end collections) and returns one of two arrays, according to the requested views:
Gallery:
array of urls to the item’s first related media, along with a short description. If item has no media filler urls are provided.Tabular:
array of objects used to show items in a tabular form. These objects are defined by tabularPageQuery() eager loader & tabularPageFormat() defined in each module-specific configuration files.
The paging system limits the amount of data loaded to the front end.
item.show() returns an item with its related data. These include:
fields:
The item's record retrieved from the DBtags:
Array of related tag IDsonps:
Array of related optional numeric properties and their valuesmedia:
Array of related mediarelated:
Array of related item + relation name
carousel() returns details of an item sufficient to display it in a "carousel" form. The carousel may be used on any of the three front end collections.