Connections

Retrieve logs of a specific connection

GET
https://ditto.eclipseprojects.io/api/2/connections/{connectionId}/logs

Returns the logs of the connection identified by the connectionId path parameter. Before log entries are generated and returned, logging needs be enabled with the command connectivity.commands:enableConnectionLogs. When creating or opening an connection the logging is enabled per default. This allows to log possible errors on connection establishing.

Parameters

connectionIdstringrequiredpath

The ID of the connection

Response

The request successfully returned the connection logs.

Response fields application/json

Log entries of a connection.

connectionIdstringrequired

ID of the connection for which the log entries were logged.

Example
759304b8-8056-11e9-bc42-526af7764f64
connectionLogsArray<LogEntry>required

Log entries for the connection.

Show child attributes

Represents a log entry for a connection.

timestampstringrequired

Timestamp of the log entry.

Example
2019-01-21T08:57:24.710Z
correlationIdstringrequired

Correlation ID that is associated with the log entry.

Example
759304b8-8056-11e9-bc42-526af7764f64
messagestringrequired

The log message.

Example
Successfully connected to ... at ...
categoryLogCategorysourcetargetresponseconnectionrequired

A category to which the log entry can be referred to.

typeLogTypeconsumeddispatchedfilteredmappeddroppedenforcedpublishedotherrequired

The type of a log entry describing during what kind of activity the entry was created.

levelLogLevelsuccessfailurerequired

Escalation level of a log entry.

addressstring

Connection address on which the log occurred.

Example
telemetry/address
thingIdstring

The thing for which the log entry was created.

Example
org.ditto:theThing
enabledSincestring

Since when logging is enabled. Might be missing / null if logging is not enabled.

Example
2019-01-21T08:57:24.710Z
enabledUntilstring

Until when logging is enabled. Might be missing / null if logging is not enabled.

Example
2019-01-22T08:57:24.710Z
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.