sparkfun / phant-manager-http

express based manager module for phant
5 stars 6 forks source link

Support for JSON PATCH on update #10

Closed dpjanes closed 6 years ago

dpjanes commented 10 years ago

Issue: Updating the metadata with JSON POST is (1) really not RESTy (2) blanks out data not in the post. It would be nice to be able to update only certain named fields.

Background: HTTP 'PATCH' is similar to PUT except that only fields sent should be updated. http://tools.ietf.org/html/rfc5789

Solution: routes.update should detect PATCH and default data as needed.

(I am willing to code this)

toddtreece commented 10 years ago

@dpjanes the stream metadata interface was really not intended to be REST compliant since we want people to create streams manually on data.sparkfun.com to avoid abuse (and insane hosting fees), but there is no reason why it couldn't be added to phant-manager-http.

dpjanes commented 10 years ago

The nice thing with this [from the issue you mention] is they can't create streams with it, only update them.

toddtreece commented 10 years ago

Yeah. I meant we didn't want to add a full REST interface to data.sparkfun.com, but it can be added to phant-manager-http. PATCH on it's own can be added to data.sparkfun.com with no issues.

bboyho commented 6 years ago

Phant is No Longer in Operation

Unfortunately Phant, our data-streaming service, is no longer in service and will be discontinued. The system has reached capacity and, like a less-adventurous Cassini, has plunged conclusively into a fiery and permanent retirement. There are several other maker-friendly, data-streaming services and/or IoT platforms available as alternatives. The three we recommend are Blynk, ThingSpeak, and Cayenne. You can read our blog post [ https://www.sparkfun.com/news/2413 ] on the topic for an overview and helpful links for each platform.