Jump to content









Photo

Status Streams and Data Streams - be careful in the API usage

status data streams api

  • Please log in to reply
2 replies to this topic

#1 Zambiot

Zambiot

    Advanced Member

  • Members
  • PipPipPip
  • 94 posts
  • LocationAsia

Posted 21 April 2013 - 02:59 AM

As a reminder to those working the streams and status.  Streams as in "data streams" and status as in "status streams".  In the API, you will see that when working with "data streams", the URLs generally have "streams/" in them.

 

When working with "status streams" create uses "status/", but show, list and delete, uses "streams/" and it is expected that a parameter is used to narrow the list to status.  I was expecting the pattern that "status/" would also be used for show, list and delete as to keep a segregation from streams.  Because the API is mixing "data streams" and "status streams", you need to be careful with processing.  Furthermore, if you want to delete just one data or just status, but not other, certainly BE SURE to set the parameter for what kind of list to use.  

 

I just deleted all data and status streams.  This isn't a problem, I was going to delete all of them for cleaning up test data, but I was shocked to just see now that there isn't good segregation of status and data streams.



#2 alvaro

alvaro

    Carriots CTO

  • Administrators
  • 72 posts

Posted 21 April 2013 - 09:15 AM

Thanks Zambiot for pointing at this issue.

It's true that all streams "data" and "status" are handled the same way internally. The only difference is the "_t" attribute where its value can be "sta" for status or "str" for data.

We're sorry about all this stream deletion.


Alvaro Everlet

Carriots CTO


#3 Zambiot

Zambiot

    Advanced Member

  • Members
  • PipPipPip
  • 94 posts
  • LocationAsia

Posted 21 April 2013 - 10:11 AM

Thank you Alvaro.  No need to be sorry, I just want others to be aware of this.

 

Since the Create verb used "/streams/", I was expecting the other verbs to also use the same streams.  You may want to consider implementing this.  For me, I'd like the separation, but I know you guys have a lot of experience and know what is best.







Also tagged with one or more of these keywords: status, data, streams, api

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users