Skip to main content Link Search Menu Expand Document (external link)

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

{
	"microAppID":"<insert microapp id here>"
}

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:

POST /api/microappdata
X-Auth-Token: <token goes here>
X-User-Id: <userID goes here>

{
	"microAppID":"<insert microapp id here>"
}

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:

POST /api/microappdata
X-Auth-Token: <token goes here>
X-User-Id: <userID goes here>

{

	"microAppID":"<enter microAppID here>",
	 "optSearchFilters": [{
		"resourceID": "<enter microAppID here>",
		"fieldID":"<get fieldID>",
		"value":"<value of field>"
      }]

}

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.

POST /api/microappdata
X-Auth-Token: <token goes here>
X-User-Id: <userID goes here>

{
	"microAppID": "<enter microAppID here>",
	"searchFilter": [
		{
			"resourceID": "<microapp ID goes here>",
			"order": 1,
			"field": "1",
			"skip": "5",
			"limit": 100
		}
	]
}

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.

POST /api/microappdata
X-Auth-Token: <token goes here>
X-User-Id: <userID goes here>

{
	"microAppID": "<enter microAppID here>",
	"searchFilter": [
		{
			"resourceID": "<microapp ID goes here>",
			"skip": "100",
			"limit": 100
		}
	],
	"buzzyFormat":true
}

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.