Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Mihini/Rest
This page describes the current status of the Mihini Rest service
Contents
Specifications
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("node.subnode.leaf") | devicetree/node/subnode/leaf | GET | Nothing |
devicetree.set("node.subnode.leaf", "myvalue") | devicetree/node/subnode/leaf | PUT | The new value of "node.subnode.leaf" 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, asynchronous by default) | POST | The tar archive sent as binary data in a http chunked request |
update.getstatus() | update/ | sync=[0-1] (optional, asynchronous by default) | GET | Nothing |
Configuration
Everything is configurable in the config store through the defaultconfig.lua
-- Rest related settings rest = {} rest.activate = true rest.port = 8357
Or just with a lua shell
$ telnet localhost 2000 > :agent.config.rest.activate true > :agent.config.rest.port 8357
Suggestions
Feel free to send your feedbacks on the Mihini mailing list, suggestions for improvements are always welcome