Elastic Context

  • A very handy API handle to perform various analytical search operations across different data models of the platform

  • Platform has exposed a variety of data models to build your IoT solution effortless and elegantly. This single interface allows you to manage those entity objects.

  • Context Variable: elastic

Meta Models (Search Types)

MESSAGERECORDNOTIFICATION
DOMAIN_RECORDSYSTEM_RECORDGLOBAL_RECORD
ACCESSALEXAASSET
ASSET_GROUPAUDITCOMMAND
CONNECTION_POOLDB_METADATADB_TEMPLATE
DEVICEDEVICE_GROUPDEVICE_MODEL
DOMAINDOMAIN_ASSET_GROUPDOMAIN_DEVICE_GROUP
DOMAIN_USER_GROUPDOMAIN_USER_GROUP_MEMBEREMAIL
EVENTEVENT_REGISTRATIONFCM
FCM_DEVICEFILEFILE_PUBLIC
FIRMWAREGEOFENCEGROOVY
GROOVY_JARLOCATIONLOCATION_HISTORY
OBJECTPLUGINPUBLIC_GROOVY
PUBLIC_GROOVY_JARPUBLIC_NOTIFICATIONLOG
REPORTED_DEVICERULE_FAILURESCREEN
SCREEN_VERSIONSCREEN_IMPORTEDSMS
SQL_TABLESQL_TEMPLATEUSER
USER_ASSET_GROUPUSER_DEVICE_GROUPUSER_GROUP
VERTICALVERTICAL_IMPORTEDVERTICAL_PUBLISHED
VERTICAL_VERSIONVOICEWIDGET
WIDGET_IMPORTEDWIDGET_PUBLISHEDWIDGET_VERSION
BILLINGCONTACTINVOICE
BILLING_TEMPLATESENT_COMMANDROLE
USER_ROLEASSET_GROUP_MEMBERDEVICE_GROUP_MEMBER
DOMAIN_ASSET_GROUP_MEMBERDOMAIN_DEVICE_GROUP_MEMBERUSER_ASSET_GROUP_MEMBER
USER_DEVICE_GROUP_MEMBERUSER_GROUP_MEMBERORGANIZATION
ORGANIZATION_ROLEORGANIZATION_USER_ROLEORGANIZATION_DEVICE
ORGANIZATION_ASSETORGANIZATION_USERORGANIZATION_USER_DEVICE
ORGANIZATION_USER_ASSETPROCESSWORKFLOW
WORKFLOW_INSTANCEGLOBAL_PROCESSGLOBAL_WORKFLOW
GLOBAL_WORKFLOW_INSTANCESFTP_INPUTORG_SFTP_INPUT
GLOBAL_SFTP_INPUTSYSTEM_SFTP_INPUTMQTT_INPUT
ORG_MQTT_INPUTGLOBAL_MQTT_INPUTSYSTEM_MQTT_INPUT
UDP_INPUTORG_UDP_INPUTGLOBAL_UDP_INPUT
SYSTEM_UDP_INPUTTCP_INPUTORG_TCP_INPUT
GLOBAL_TCP_INPUTSYSTEM_TCP_INPUTEMAIL_INPUT
ORG_EMAIL_INPUTGLOBAL_EMAIL_INPUTSYSTEM_EMAIL_INPUT

API Interface

// Search operation
public Map<String, Object> search(String type, String query);

// Search using template operation
public Map<String, Object> search(String type, String template, Map<String,Object> params);
	
// Count operation
public Map<String, Object> count(String type, String query);

// Count using template operation
public Map<String, Object> count(String type, String template, Map<String,Object> params);
	
// Find operation
public Map<String, Object> find(String type, String query);

// Find using template operation
public Map<String, Object> find(String type, String template, Map<String,Object> params);
	
// Merge operation
public Map<String, Object> merge(String type, Map<String,Object> fields);
	
// Merge operation
public Map<String, Object> merge(String type, JSONObject jsonObj);
	
// Merge operation
public Map<String, Object> merge(String type, Object bean);
	
// Merge operation
public Map<String, Object> merge(String type, String jsonStr);

// Merge using template operation
public Map<String, Object> merge(String type, String template, Map<String,Object> params);
	
// Purge operation
public Map<String, Object> purge(String type, String query);

// Purge using template operation
public Map<String, Object> purge(String type, String template, Map<String,Object> params);
	
// Remove operation
public Map<String, Object> remove(String type, String query);

// Remove using template operation
public Map<String, Object> remove(String type, String template, Map<String,Object> params);
	
// Scroll operation
public Map<String, Object> scroll(String type, String query);
	
// Scroll using template operation
public Map<String, Object> scroll(String type, String template, Map<String,Object> params);
	
// List available search types
public List<String> types();

// Required for MESSAGE & RECORD types
public void setSpecId(Long specId);

// Required for MESSAGE & RECORD types
public void setSpecId(String specId);

// Requires for Merge operation
public void setEntityId(String entityId);

// Extra search path
public void setExtraPath(String extraPath);

// Extra query parameters
public void setQueryParams(Map<String, String> queryParams);

APIs Inherited From

Context Base

Related REST APIs

Search By Query
Search by Template
Count By Query
Find By ID
Merge By ID
Update By Query
Update by Template
Remove By ID
Purge
Purge by Template
Scroll previous result set