I tried to check the URL by using device id_developer... i tried in JAVA too as well as in hurl.it ; but response is 401 Unauthorised. it is not showing 200 ok... Can anyone help me out in it?
Jump to content
Posted 17 December 2015 - 09:48 AM
To do a GET petition of a device stream you need de id_developer of the stream. For example:
You can see the id_developer of a stream doing a GET petition to the https://api.carriots.com/streams URL and searching the stream in the list.
Try it on the API Console and tell me.
Posted 18 December 2015 - 10:15 AM
Thank you for the help.i Got it correct.I have one more doubt that is shall we update a value with url and send stream?
for eg : updating the value of temperature in our device
Posted 18 December 2015 - 11:32 AM
That is i have a device named test with id_developer: email@example.com with sensor type temperature. I want to update temperature with a value say 21.How is that possible in Carriots?
It is said to use PUT Request.But what should be filled in the Payload column?
Posted 18 December 2015 - 11:47 AM
Posted 21 December 2015 - 07:18 AM
Thank you Yoleon. its working.
I am trying to update from the URL itself. i.e. i tried java program to get the response and streams .It worked well, but is that possible to update using the URL?
Posted 21 December 2015 - 08:54 AM
To update a device using the URL you can try at the API Console the PUT petition to update a device, but you need all the information to update it. I recommend that you do a GET petition of the device to have the information and do a PUT of them changing the temperature property by the updated value of the last stream.
Try it and tell me.
0 members, 0 guests, 0 anonymous users