Submitted by TrystanLea on Sun, 02/03/2014 - 16:12.
batulzii: emoncms does not have a true/full REST API. One visible part of exemplary rest api's such as pachube/xively's api is the use of http request methods GET, POST, PUT and DELETE. Using this full range of methods and building the api around it so that GET /nodes return a list of notes POST /nodes posts data to a node DELETE /node deletes a node is commonly considered good practice
Most of emoncms's api calls are done via GET unless there is a reason why the request cant be done with GET, the historical reason for this is that using GET makes api testing via the browser's address bar easier. Its not a fantastic reason because its not hard to create a script to test with different methods.
At the moment:
User login and registering is done via POST so that the password is not placed in the URL, it is instead in the body of request.
Dashboard set content uses POST to get around the data length limit of GET.
In the future a full REST API would be a good to add, so that emoncms adheres to higher coding standards but from a users point of view there may not be much visible difference to the behavior of the app.
Re: EmonCMS - is REST web service?
It would be good to understand why this is important to you.
Re: EmonCMS - is REST web service?
I'm new to web service. And i'm learning about web service in last week. That why i asked! Hope explain me
Re: EmonCMS - is REST web service?
Ukmoose, waiting for your reply.
Re: EmonCMS - is REST web service?
batulzii: emoncms does not have a true/full REST API. One visible part of exemplary rest api's such as pachube/xively's api is the use of http request methods GET, POST, PUT and DELETE. Using this full range of methods and building the api around it so that GET /nodes return a list of notes POST /nodes posts data to a node DELETE /node deletes a node is commonly considered good practice
Most of emoncms's api calls are done via GET unless there is a reason why the request cant be done with GET, the historical reason for this is that using GET makes api testing via the browser's address bar easier. Its not a fantastic reason because its not hard to create a script to test with different methods.
At the moment:
User login and registering is done via POST so that the password is not placed in the URL, it is instead in the body of request.
Dashboard set content uses POST to get around the data length limit of GET.
In the future a full REST API would be a good to add, so that emoncms adheres to higher coding standards but from a users point of view there may not be much visible difference to the behavior of the app.
Re: EmonCMS - is REST web service?
Thank you for kind support! Helped me to understand about EmonCMS.