Create HTTP API for managing connections
Currently, connection management in Ditto can only be done via "piggyback devops commands":
- https://www.eclipse.org/ditto/installation-operating.html#managing-connections
- https://www.eclipse.org/ditto/connectivity-manage-connections.html
This is quite cumbersome as the response is "wrapped" into a JSON envelope and e.g. the actual "statusCode" is a field in that JSON payload instead of being reflected as real HTTP status code.
This issue proposes to add a new HTTP API in order to manage connections, e.g.:
POST /api/2/connections
GET /api/2/connections/<connectionId>
PUT /api/2/connections/<connectionId>
DELETE /api/2/connections/<connectionId>
POST /api/2/connections/<connectionId>/command
GET /api/2/connections/<connectionId>/status
GET /api/2/connections/<connectionId>/metrics
GET /api/2/connections/<connectionId>/logs
This should reflect all available Connection commands with a HTTP endpoint. The authentication of this API should be done with the Ditto "devops" user - as connections currently do not forsee having a "policyId" and this would lead to much effort adding the "policyId" to connections.
@thfries I know you are planning on also working on a "connections" functionality in the Ditto UI. Please be aware that we aim to soon work on this issue, providing an HTTP API for the connections management instead of being forced to use "devops commands".
Thanks for the heads-up, @thjaeckle. I'll try to keep this integration locally so it can easily replaced. But I would like to push the connections UI forward in parallel, because it is quite important.