Jump to content









Photo

Searching for a particular Data Stream through REST

search REST GET

  • Please log in to reply
3 replies to this topic

#1 pramod2181

pramod2181

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 16 December 2014 - 01:03 PM

Hi,

 

Is there a way to query for a data stream through REST using some parameter.

 

For example, if I have few data in the Carriots which have Serial No as key and have different values like 1,2,3,4,5, then in this case can I make a REST call to return the result for Serial No. 5.

 

I tried using GET with

http://api.carriots....ce=--DeviceID--

and it returned 200 OK, but it displayed {"total_documents":0,"result":""} as result.

 

Please help me.

 



#2 sdeancos

sdeancos

    Master of Puppets

  • Members
  • PipPipPip
  • 107 posts
  • LocationMadrid, Spain.

Posted 17 December 2014 - 12:25 PM

Hi,

 

You should use this request:

 

http://api.carriots.com/streams/?sort=at&order=desc&max=1&data[Serial_No]=5&device=--DeviceID--

 

 

note: data[Serial_No]

 

 

 

I hope this help you,

 

enjoy Carriots,

 

BR.



#3 pramod2181

pramod2181

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 17 December 2014 - 01:30 PM

It totally worked....

 

Thanks a lot... :)



#4 sdeancos

sdeancos

    Master of Puppets

  • Members
  • PipPipPip
  • 107 posts
  • LocationMadrid, Spain.

Posted 17 December 2014 - 03:48 PM

I am glad that it worked,

 

thanks to you!

 

:D







Also tagged with one or more of these keywords: search, REST, GET

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users