-
Notifications
You must be signed in to change notification settings - Fork 71.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal to Update REST API #344
Comments
Just adding some interesting tools/documentation i've encountered that might be useful for this feature/project. Has the teem considered using something like: http://loopback.io for documenting and exposing the APIs? might help in testing too. |
It would also be nice to expose any mbgs, filtered, unfiltered, noise, and rssi data at some point. |
all that is getting filtered by the sgvdata module, I think we're going to pull it out. Right now the api only supports the count param, really need some pagination, maybe query by date |
Here are some nice tips for REST design. http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#requirements |
@jimsiff expressed some interest in helping document the API. If possible, there's a tool called swagger that might help a lot. I modified the example uber api swagger spec to come up with this one: https://gist.github.com/bewest/5fb2910aa09a94052712 You can drag it/import it into swagger's demo API and it generates very nice documentation, complete with the objects to expect in the responses: http://editor.swagger.io/#/ |
It can also generate client code which is nice. @bewest - I like the PriceEstimate model ;-) |
@someoneAnyone hehe, patches welcome, hehehe. Turns out the REST API is already capable of some fairly advanced searching and filtering, if you know the right syntax: #504 I'll be working on extending it with feedback from community. I updated that gist with a slightly more complete data model, HTH. |
@jimsiff I created this repo https://github.com/bewest/ns-types where I've combined a lot of notes taken over the last year. I'd like to use this to create website devoted to just discussing the data model, and have it available as a module for NS. My hope is this will replace sgvdata by including definitions for all the data types. Since it's got all the data-types, it might be a good place to document the "design" of the API as well, or perhaps it better in the wiki in this repo? Thoughts/feedback? |
When I've worked up an implementation of the data-model with module/website, I'll move it into NS github if turns out to be workable/desirable code. |
👍 Sounds like a good idea. |
Per the conversation in gitter.im:
There are multiple clients (watches too) working their way through development that leverage nightscout data. It would be great if more of the data was available via rest APIs so things can be consistently and generically handled.
Can the APIs be modified so that items like bg-delta, or prediction entries are available?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7767134-proposal-to-update-rest-api?utm_campaign=plugin&utm_content=tracker%2F2451736&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2451736&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: