Drop Object Overview


A Drop represents a single entity of data within flowthings.io. Drops contains a heterogenous map of elements. It's an atomic piece of information that can exist in one or more Flows.

A Drop could be a reading from a sensor, an inventory update, a location update; the possibilities are endless. Any complex assortment of related data elements can map to the elements of a Drop.

 {
      "path": "/my_account_id/my_first_flow",
      "location": {
          "lat": 40.703285,
          "lon": -73.987852
      },
      "elems": {
          "name": "foo",
          "error_rate": 0.15,
          "service_available": true,
          "status_codes": {
              "type": "sortedSet",
              "value": [
                  {
                      "type": "integer",
                      "value": 100
                  },
                  {
                      "type": "integer",
                      "value": 90
                  },
                  {
                      "type": "integer",
                      "value": 100
                  },
                  {
                      "type": "integer",
                      "value": 75
                  }
              ]
          },
          "stats": {
              "voltage": 15.4,
              "temp": 30.4,
              "uptime": 1992343.4
          }
      }
  }

As you can see in the example above, Drops support not only standard JSON types, but allows users to specify additional types, such as sets, sanitized html, and urls. The full list of supported types can be found at Drop Data Types.

Drop Object Members


elems

A map of data elements for the Drop. Values in the map may be of any data type that flowthings.io supports. If the type is not one that JSON supports, it must be supplied. See data_types for a list of types which must be specified in a {type:..., value:...} mapping.

path

The path of the Flow where the Drop is to be written, optional if the flowId is provided in the url of the POST.

location

A location for the Drop. For more on specification options, see Location Data.

Working with Drops


More on Location Data