GET
List all installed modules.
Response media type: application/json
{
<string>: {
"name": <string>,
"description": <string>,
"services": {
<string>: {"hash": <string>}
},
"hash": <string>,
"state": <string> # "active", "inactive"
},
...
}
POST
Install / update module. Saves module metadata locally and configs to Configuration Storage Service.
If updating the module state must be "inactive".
Request media type: application/json
{
"id": <string>,
"name": <string>,
"description": <string>,
"services": {
<string>: {
"deployment_configs": {
"image": <string>,
"volumes": {<string>:<string>}, # can be null
"devices": {<string>:<string>}, # can be null
"ports": [ # can be null
{
"container": <number>,
"host": <number>,
"protocol": <string/Null> # "tcp", "udp", "sctp"
}
]
},
"service_configs": {<string>:<string/number>}, # can be null
"hash": <string>
}
},
"hash": <string>
}
PATCH
Change module state.
Setting state to "active" triggers deployment (create and start containers).
Setting state to "inactive" stops containers.
Request media type: application/json
{
"state": <string> # "active", "inactive"
}
DELETE
Remove module.
module must be set to "inactive".
Removes metadata, configs, containers, volumes, images.