Connections

Send a command to a specific connection

POST
https://ditto.eclipseprojects.io/api/2/connections/{connectionId}/command

Sends the command specified in the body to the connection identified by the connectionId path parameter.

Body

text/plain

The command to send. Supported commands are

  • connectivity.commands:openConnection
  • connectivity.commands:closeConnection
  • connectivity.commands:resetConnectionMetrics
  • connectivity.commands:enableConnectionLogs
  • connectivity.commands:resetConnectionLogs
string
Example
<commmand>

Parameters

connectionIdstringrequiredpath

The ID of the connection

Response

200OK

The command was sent to the connection successfully.

400Bad RequestAdvancedError

The request could not be completed. The connectionId must be an URI.

Response fields application/json
statusintegerrequired

The HTTP status of the error

errorstringrequired

The error code of the occurred exception

messagestringrequired

The message of the error - what went wrong

descriptionstring

A description how to fix the error or more details

hrefstring

A link to further information about the error and how to fix it

401UnauthorizedAdvancedError

The request could not be completed due to missing authentication.

Response fields application/json
statusintegerrequired

The HTTP status of the error

errorstringrequired

The error code of the occurred exception

messagestringrequired

The message of the error - what went wrong

descriptionstring

A description how to fix the error or more details

hrefstring

A link to further information about the error and how to fix it

403ForbiddenAdvancedError

The request could not be completed due to invalid authentication.

Response fields application/json
statusintegerrequired

The HTTP status of the error

errorstringrequired

The error code of the occurred exception

messagestringrequired

The message of the error - what went wrong

descriptionstring

A description how to fix the error or more details

hrefstring

A link to further information about the error and how to fix it

404Not FoundAdvancedError

The request could not be completed. The connection with ID connectionId was not found.

Response fields application/json
statusintegerrequired

The HTTP status of the error

errorstringrequired

The error code of the occurred exception

messagestringrequired

The message of the error - what went wrong

descriptionstring

A description how to fix the error or more details

hrefstring

A link to further information about the error and how to fix it

Authorization

DevOpsBasichttp (basic)

Eclipse Ditto devops user (devops) + password (foobar)

DevOpsBearerhttp (bearer)

A JSON Web Token issued by a supported OAuth 2.0 Identity Provider for the Eclipse Ditto devops user.