Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Mihini/Rest"
< Mihini
(→Update) |
(→Update) |
||
Line 81: | Line 81: | ||
| update.localupdate(path, sync) | | update.localupdate(path, sync) | ||
| update/ | | update/ | ||
− | | sync | + | | sync=[0-1] (optional) |
| POST | | POST | ||
| The tar archive sent as binary data in a http chunked request | | The tar archive sent as binary data in a http chunked request | ||
Line 87: | Line 87: | ||
| update.getstatus() | | update.getstatus() | ||
| update/ | | update/ | ||
− | | sync | + | | sync=[0-1] (optional) |
| GET | | GET | ||
| Nothing | | Nothing |
Revision as of 04:30, 10 June 2013
This page describes the current status of the Mihini Rest service
Contents
Specifications
Arguments
When it makes sense, URL is kept simpler as possible. Arguments are either passed in the URL as sub-URL or serialized with JSON and put in the HTTP request (as payload)
Returned values
Each Rest function returns the same value as the function to which it corresponds, except that it is serialized with JSON
API
Devicetree
Module API | Rest URL | HTTP method | HTTP payload |
---|---|---|---|
devicetree.get(mypath) | devicetree/mypath | GET | Nothing |
devicetree.set(mypath, myvalue) | devicetree/mypath | PUT | The new value of "mypath" serialiazed with JSON |
Application container
Module API | Rest URL | HTTP method | HTTP payload |
---|---|---|---|
appcon.list() | application/ | GET | Nothing |
appcon.status(id) | application/id | GET | Nothing |
appcon.start(id) | application/id/start | PUT | Nothing |
appcon.stop(id) | application/id/stop | PUT | Nothing |
appcon.configure(id, autostart) | application/id/configure | PUT | A boolean value corresponding to "autostart" and serialized with JSON |
Update
Module API | Rest URL | URL parameter | HTTP method | HTTP payload |
---|---|---|---|---|
update.localupdate(path, sync) | update/ | sync=[0-1] (optional) | POST | The tar archive sent as binary data in a http chunked request |
update.getstatus() | update/ | sync=[0-1] (optional) | GET | Nothing |
Getting the source
Get the full branch using git clone:
git clone ssh://git.eclipse.org/gitroot/mihini/org.eclipse.mihini.git -b bugs/402289 mihini
If you already have cloned the Mihini repository, just checkout the branch locally:
git checkout -b bugs/402289 origin/bugs/402289
Suggestions
Feel free to send your feedbacks on the Mihini mailing list, suggestions for improvements are always welcome