Skip to main content
Bubl Cloud Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

3 Common Data

Common Data Model

Common data is organized in domains and levels. The existing common data models are:

Domain Level Table Definition Available Table Names Available Keys
profile 1 Key value profiledata 0_name, 0_locale_preference
profile 2 Key value profiledata 0_email, 0_phonenumber
profile 3 Key value profiledata 0_address
identification 4 Key value identificationdata 0_dob, 0_gender
health 1 Key value health_request key (string), value (JSON object)
health 2 Key value consults_questionnaire key (string), value (JSON object)
health 3 Key value consult_photos, consult_answer, consults key (string), value (JSON object)
energy 1 Energy Minute minute See EnergyData struct fields: timestamputc, dmsrTimeStamp, cumPower, etc.
energy 2 Energy Hour hour See EnergyDataHour struct fields: timestamputc, cumPower, deltaPower, etc.

Data Structures

Most domains use a key-value JSON structure, where:

  • key is a string identifier
  • value is a JSON object that can contain any custom data structure

The Energy domain is an exception with specific data models defined below.

Available Keys, Value Example, and Table Name

Available Key Value Example / Structure Table Name
0_name { "firstName": "John", "lastName": "Doe" } profile_100_profiledata
0_locale_preference "en_US" profile_100_profiledata
0_email "john@example.com" profile_200_profiledata
0_phonenumber "+1234567890" profile_200_profiledata
0_address {"street":"right st.","houseNumber":"123","city":"Amsterdam","zipcode":"123","country":"NL"} profile_300_profiledata
0_dob "1990-01-01" identification_400_identificationdata
0_gender "M" identification_400_identificationdata
consult UUID (string) { "question": "Do you smoke?", "answer": "No" } health_200_consults_questionnaire
consult UUID (string) { "photoUrl": "https://..." } health_300_consult_photos
consult UUID (string) { "answerText": "Take rest" } health_300_consult_answer
consult UUID (string) { "consultId": "abc123", "status": "open" } health_300_consults

Energy Structure request/response

type EnergyData struct {
	Timestamputc  int64   `json:"timestamputc"`
	DmsrTimeStamp string  `json:"dmsrTimeStamp"`
	CumPower      int64   `json:"cumPower"`
	DeltaPower    float64 `json:"deltaPower"`
	CumReturn     int64   `json:"cumReturn"`
	DeltaReturn   float64 `json:"deltaReturn"`
	L1Volt        float64 `json:"l1Volt"`
	L2Volt        float64 `json:"l2Volt"`
	L3Volt        float64 `json:"l3Volt"`
	CumGas        float64 `json:"cumGas"`
	DeltaGas      float64 `json:"deltaGas"`
}
type EnergyDataHour struct {
	Timestamputc int64   `json:"timestamputc"`
	CumPower     int64   `json:"cumPower"`
	DeltaPower   float64 `json:"deltaPower"`
	CumReturn    int64   `json:"cumReturn"`
	DeltaReturn  float64 `json:"deltaReturn"`
	L1VoltAvg    float64 `json:"l1VoltAvg"`
	L2VoltAvg    float64 `json:"l2VoltAvg"`
	L3VoltAvg    float64 `json:"l3VoltAvg"`
	L1VoltMax    float64 `json:"l1VoltMax"`
	L2VoltMax    float64 `json:"l2VoltMax"`
	L3VoltMax    float64 `json:"l3VoltMax"`
	CumGas       float64 `json:"cumGas"`
	DeltaGas     float64 `json:"deltaGas"`
}