It's easy to get started. No setup. It just works.
Jump right in with the instructions and code listed below here. Get going in minutes.
Connect your things using one of our, or a community-submitted, code libraries, or develop your own. It's easy to get your things talking
Check out the documentation for our API via an intuitive Swagger interface.
Send data from your thing to the cloud by "dweeting" it with a simple HAPI
web API. You can also play with dweet.io using our API console.
To dweet from your thing, simply call a URL like:
Just replace my-thing-name with a unique name. That's it!
Any query parameters you add to the request will be added as key-value pairs to the content of the dweet. For example: https://dweetpro.io/dweet/for/my-thing-name?hello=world&foo=bar
You can also send any valid JSON data in the body of the request with a
Dweet.io will also respond to JSONP requests with a
?callback= query parameter.
While we recommend using a secure https:// connection, dweet.io also supports un-secure http://
connections for devices that don't support SSL.
Dweet.io will respond with:
To read the latest dweet for a thing, you can call...
Note that dweet.io only holds on to the last 5 dweets over a 24 hour period. If the thing hasn't dweeted
in the last 24 hours, its history will be removed.
Or to read all the dweets for a dweeter, you can call...
Dweet.io will respond with one or more dweets which look like:
"this": "is cool!"
Dweets are stored for up to 1 month if they are locked
. You can query a maxiumum 1 day of dweet history per request
or as granular as 1 hour. Locks cost $1.99/month
To get all of a thing's dweets for a given hour:
A valid thing name.
Since storage only applies to locked things, you have to specify a key. To find out about locked things, please visit here
The calendar date (YYYY-MM-DD) from which you'd like to start your query. The response will be a maximum of one day.
The hour of the day represented in the date parameter in 24-hour (00-23) format. If this parameter is included, a maximum of 1 hour will be returned starting at this hour. This paramater is optional. If not included, all dweets for specified day will be returned.
Current valid parameters for this are 'csv' and 'json'. If this parameter is left blank, all responses default to hapi-json dweet-speak. CSV is only possible for dweets with a static data model. For example, if your dweet parameters are 'temp' and 'humidity' and then change to 'status' and 'speed', the api will respond with an error when trying to output CSV.
An example for getting all the dweets for a thing on Jan 31st between 1-2pm in CSV
You can also create a real-time subscription to dweets using a "chunked" HTTP response.
Just make a call to
(Note, this won't work in a standard browser)
From a unix command line you can run the following command to see it working:
curl -i https://dweetpro.io/listen/for/dweets/from/my-thing-name
The server will keep the connection alive and send you dweets as they arrive, like:
If you don't know what a chunked HTTP response is, it might be easier to use one of our client libraries
Alerts notify you when something in the data you dweet falls outside set of conditions. Alerts are reserved for locked
To set an alert, make a call to:
A comma separated list of Email addresses. If you want to send a text/SMS message, you can do that too (via Email)— just check this out
A valid thing name.
For example, alert me when a temperature becomes extreme:
dweet.temp <= 32 || dweet.temp >= 212
You can also create more complex, multi-state alerts by returning a string:
if(dweet.temp <= 32) return "frozen"; else if(dweet.temp >= 212) return "boiling";
Math functions are supported.
You should normally URL-encode your condition, but you can also pass the condition in the body of a post message if it does not fit within the URL.
Since alerts are only allowed on locked things, you have to specify a key. To find out about locked things, please visit here
Putting it all together:
To remove an alert, you can call:
You can also access dweet.io even quicker and easier with these pre-built client libraries.