Data formart to forward

Date format

All JavaScript supported formats are supported

  • ISO Date
    2018-04-23T10:26:00.996Z
  • Short Date
    04/23/2018
    04/23/2018 12:26:00.996+02:00
  • Long Date
    Mar 23 2018 10:26:00.996Z
    23 Mar 2018 12:26:00.996+02:00
    March 23 2018

 


 

Data format

To forward devices data, two standard Databoom formats are mainly used:

  • Forwarding signals with their values. All the values refer to the same date, if it is not specified, the current date is used.
    { 
    "device": "DEVICE TOKEN",
    "date": "DATE",
    "signals" : [
    {
    "name": "TOKEN SEGNALE",
    "value": VALORE SEGNALE
    },
    ...
    ]
    }
  • Forwarding signals with their values history. Each value has a specific date.
    {
        "device": "DEVICE TOKEN",
        "signals" : {
            "SIGNAL TOKEN": {
                "description": "SIGNAL DESCRIPTION",
                "history": [
                    {
                        "date": "VALUE DATE",
                        "value": SIGNAL VALUE
                    },
                    ...
                ] 
            },
            ...
        }
    }
    

     

 


 

Example

Consider the device in figure:

  • The device token is 0f6hbfnqz6
  • Signas tokens are:
    • Signal 1, signal_one
    • Signal 2, signal_two

With the example data, supported push formats are:

  •   {
    	"device":"0f6hbfnqz6",
    	"signals": [
            {
                "name" : "signal_one",
                "value" : 24.35156                    
            },
            {
                "name" : "signal_two",
                "value" : 16.92874                    
            }
    	]
    }
      
  •   {
    	"device":"0f6hbfnqz6",
    	"signals": {
    		"signal_one": {
                "history" : [
                    {
                        "value" : 24.35156, 
                        "date" : "2020-08-04T09:30:00.000+0000"
                    }, 
                    {
                        "value" : 23.90625, 
                        "date" : "2020-08-04T09:31:00.000+0000"
                    }
                ]
            },
            "signal_two": {
                "history" : [
                    {
                        "value" : 22.16728, 
                        "date" : "2020-08-04T09:30:00.000+0000"
                    }, 
                    {
                        "value" : 18.19027, 
                        "date" : "2020-08-04T09:31:00.000+0000"
                    }
                ]    
    		}
    	}
    }
      
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.