This page contains detailed information about the GCP Firebase Realtime Database serivce in the Tartabit IoT Bridge. This service interacts with the database to enable setting and retrieving records quickly.
The GCP Firebase service contains the information required to establish a connection to your Firebase database.
{
"type": "service_account",
"project_id": "tartabit-demo",
"private_key_id": "0f5b95*****036cf23",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIE*****demo.iam.gserviceaccount.com",
"client_id": "116*****70497",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-hhp39%40tartabit-demo.iam.gserviceaccount.com"
}
Set a value at the specified path in the database.
// Set the object to /mypath, sub-objects will be created automatically.
gcp_firebase_db.set('myservice', '/mypath', {"field1": "abc", "field2": 456})
// Set the primitive value to /mypath.
gcp_firebase_db.set('myservice', '/mypath', 'mystring')
Push a value at the specified path in the database as a list.
// push the object to a list at /mypath with a unique id.
gcp_firebase_db.push('myservice', '/mypath', {"field1": "abc", "field2": 456})
Update multiple child values at the specified path in the database.
// update the children of the object, data must be an object.
gcp_firebase_db.push('myservice', '/mypath', {"field1": "abc", "field2": 456})
Get the value at the specified path in the database. The value will be returned as either a primitive or object depending on the content of the database.
// update the children of the object, data must be an object.
var data = gcp_firebase_db.get('myservice', '/mypath')
Delete the value at the specified path in the database.
// delete the referenced path and all children.
gcp_firebase_db.delete('myservice', '/mypath')
The following events are considered billable: