Read Data
This handler (com.rierino.handler.ReadEventHandler) provides ability to select one, multiple or all records from a state manager on demand, facilitating common REST API read calls.
Last updated
This handler (com.rierino.handler.ReadEventHandler) provides ability to select one, multiple or all records from a state manager on demand, facilitating common REST API read calls.
Last updated
This handler requires no parameters. This handler is cacheable.
Reads and returns aggregate for a single ID from a specific state manager. Event metadata fields applicable for this action are as follows:
domain
Name of the state manager to read data from
product
-
inputElement
Json path for the input in request event payload
parameters
-
outputElement
Json path for the output in response event payload
product
-
With event metadata parameters as:
outputPattern
JMESPath pattern to apply on data output, before returning response
{id:id, name:data.name, description:data.description}
-
idPath
Json path for the id field in input element
product.id
id
fields
Comma separated list of fields to keep in response
data.name,data.description
-
form
Form of response to produce (i.e. full=including custom data fields)
full
-
customizeBy
Comma separated list of customizations to apply to data
luxury,tech_savvy
-
Type of version data to return (, , )
history
none
Reads and returns aggregates for a list of ID from a specific state manager. Event metadata fields applicable for this action are as follows:
domain
Name of the state manager to read data from
product
-
inputElement
Json path for the input in request event payload
parameters.products
-
outputElement
Json path for the output in response event payload
list
-
If input element ends with .*, it allows iteration of an array of {id:""} objects for injection of their details. Otherwise, this action expects a list of ids in [""] form.
With event metadata parameters as:
outputPattern
JMESPath pattern to apply on each data output, before returning response
{id:id, name:data.name, description:data.description}
-
fields
Comma separated list of fields to keep in response
data.name,data.description
-
form
Form of response to produce (i.e. full=including custom data fields)
full
-
customizeBy
Comma separated list of customizations to apply to data
luxury,tech_savvy
-
skip
Number of rows to skip in results
20
-
limit
Maximum number of rows to return
10
-
Type of version data to return (, , )
history
none
For complex use cases with skip, limit, fields or outputPattern using QueryEventHandler could provide better performance, as it benefits from pass-thru query execution.
Reads and returns all aggregates from a specific state manager. Event metadata fields applicable for this action are as follows:
domain
Name of the state manager to read data from
product
-
outputElement
Json path for the output in response event payload
list
-
With event metadata parameters as:
outputPattern
JMESPath pattern to apply on each data output, before returning response
{id:id, name:data.name, description:data.description}
-
fields
Comma separated list of fields to keep in response
data.name,data.description
-
form
Form of response to produce (i.e. full=including custom data fields)
full
-
customizeBy
Comma separated list of customizations to apply to data
luxury,tech_savvy
-
first
Whether only the first record should be returned as a single value or not
true
-
skip
Number of rows to skip in results
20
-
limit
Maximum number of rows to return
10
-
orderBy
Order by field for results with direction
name desc
-