microappdata
description
Returns data from a Microapp. A filter can be applied to query the Microapp. In addition a limit can be used to improve performance. A default microapp data limit is in the server settings. A maximum value must be chosen to get all the rows.
parameters
The X-Auth-Token
and X-User-Id
are derived from the values authToken
and userId
returned from the login endpoint and are used in the HTTP header.
Resource
response
A JSON document with the Microapp data.
example
Only the microAppID
needs to be specified, in the simplest case for fetching all the data in a Microapp. It’s value can be found on the properties page of the Microapp in the editor.
Example of fetching all data from a Microapp:
filter example
A filter can be applied to narrow the results of the fetch using the optSearchFilters
array. In the optSearchFilters the resourceID is the same as the microappid. The fieldID
is an identifier that corresponds to the Field Name. It can be found in the field properties in the editor.
Example of fetching data from a microapp with a filter:
sort example
The data fetched from the Microapp can be sorted. The order
and field
parameters are used in the searchFilter to specify which Microapp sort field and if it is ascending or descending. The sort fields are configured in the Microapp Results Tab. Sort field 1 corresponds to the field
value 1 and so on. Where order
is either 1
= ascending or -1
= descending.
Example fetching microapp rows using Sort Field 1.
paging example
Pagination is achieved using the skip and limit parameters. The skip
parameter specifies the number of results to skip at the beginning. The limit
parameter specifies the maximum number of results to return.
Example fetching microapp rows using pagination.
The buzzyFormat
parameter is used to output raw data instead of JSON. This is used only in exceptional situations and please contact your buzzy representative for more information.
finding embedded row data example
When have Sub-Tables (1:M) you have a parent -> child relationship. So each parent row (the embeddingRow) can have many children.
For example, you have a row for each Invoice and you need to search the Seb-table for the Invoice Lines.
Example fetching microapp rows using `embeddingRowID`. As part of the example, assume "sortVal2" has row data to do with "approved". So to show all the Invoice Lines for the specific Invoice that are approved, the query will look like:
using mongoDB query syntax example
Buzzy is based on Mongo DB and allows you to use MongDB's query syntax, allow for more complex queries. Each object in the optViewFilters
array is AND'd. Note for OR you can include that in each object.
Example fetching microapp rows using a MongoDB like query where sortVal5
is between lowVal
and highVal
For more info on MongoDB queries see here and for some addtional Buzzy examples with custom code widgets, including geospatial queries, see here
Last updated