Retrieve all connections
Returns all connections.
Parameters
fieldsstringqueryContains a comma-separated list of fields to be included in the returned JSON.
Selectable fields
idname_revisionSpecifically selects the revision of the connection. The revision is a counter, which is incremented on each modification of a connection.
_createdSpecifically selects the created timestamp of the connection in ISO-8601 UTC format. The timestamp is set on creation of a connection.
_modifiedSpecifically selects the modified timestamp of the connection in ISO-8601 UTC format. The timestamp is set on each modification of a connection.
connectionTypeconnectionStatuscredentialsurisourcestargetssshTunnelclientCountfailoverEnabledvalidateCertificatesprocessorPoolSizespecificConfigmappingDefinitionstagsca
Examples
?fields=id,_revision,sources
ids-onlybooleanqueryWhen set to true, the request will return the registered ids only and not the whole connections objects.
Response
The request successfully returned the connections.
Response fields application/json
Show child attributes
idstringThe generated unique identifier of the connection
namestringThe name of the connection
The type of a connection
The status of a connection or resource
uristringrequiredThe URI of the connection
The subscription sources of this connection
Show child attributes
A subscription source subscribed by this connection
addressesArray<string>The source addresses this connection consumes messages from. The "telemetry", "events", "command_response" aliases should be used for connections of type "hono".
consumerCountinteger1The number of consumers that should be attached to each source address
qosintegerMaximum Quality-of-Service level to request when subscribing for messages
authorizationContextArray<string>The authorization context defines all authorization subjects associated for this source
enforcementobjectDefines an enforcement for this source to make sure that a device can only access its associated Thing.
Show child attributes
inputstringrequiredThe input value of the enforcement that should identify the origin of the message (e.g. a
device id). You can use placeholders within this field depending on the connection type. E.g. for AMQP
1.0 connections you can use {{ header:[any-header-name] }} to resolve the value from a message header.
{{ header:device_id }}filtersArray<string>requiredAn array of filters. One of the defined filters must match the input value from the message otherwise the message is rejected.
acknowledgementRequestsobjectContains requests to acknowledgements which must be fulfilled before a message consumed from this source is technically settled/ACKed at the e.g. message broker.
Show child attributes
includesArray<string>requiredAcknowledgement requests to be included for each message consumed by this source.
filterstringOptional filter to be applied to the requested acknowledgements - takes an fn:filter() function expression
[
"fn:filter(header:qos,'ne',0)"
]payloadMappingArray<string>A list of payload mappings that are applied to messages received via this source. If no payload mapping is specified the standard Ditto mapping is used as default.
headerMappingobjectDitto protocol headers computed from external headers and certain properties of the Ditto protocol messages created by payload mapping.
replyTargetobjectConfiguration for sending responses of incoming commands.
Show child attributes
enabledbooleanWhether reply target is enabled.
addressstringrequiredThe target address where responses of incoming commands from the parent source are published to. The following placeholders are allowed within the target address:
Thing ID:
{{ thing:id }}Thing Namespace:
{{ thing:namespace }}Thing Name:
{{ thing:name }}(the part of the ID without the namespace)Ditto protocol topic attribute:
{{ topic:[topic-placeholder-attr] }}Ditto protocol header value:
{{ header:[any-header-name] }}
If placeholder resolution fails for a response, then the response is dropped. NOTE Use "command" alias for connections of type "hono".
[
"{{ header:device_id }}",
"{{ source:address }}"
]headerMappingobjectExternal headers computed from headers and other properties of Ditto protocol messages.
expectedResponseTypesArray<string>responseerrornackContains a list of response types that should be published to the reply target.
The publish targets of this connection
Show child attributes
A publish target served by this connection
addressstringThe target address where events, commands and messages are published to. The following placeholders are allowed within the target address:
Thing ID:
{{ thing:id }}Thing Namespace:
{{ thing:namespace }}Thing Name:
{{ thing:name }}(the part of the ID without the namespace) NOTE Use "command" alias for connections of type "hono".
topicsArray<string>_/_/things/twin/events_/_/things/live/commands_/_/things/live/events_/_/things/live/messages_/_/policies/announcements_/_/connections/announcementsThe topics to which this target is registered for
qosintegerMaximum Quality-of-Service level to request when subscribing for messages
authorizationContextArray<string>The authorization context defines all authorization subjects associated for this target
issuedAcknowledgementLabelstringThe optional label of an acknowledgement which should automatically be issued by this target based on the technical settlement/ACK the connection channel provides.
payloadMappingArray<string>A list of payload mappings that are applied to messages sent via this target. If no payload mapping is specified the standard Ditto mapping is used as default.
headerMappingobjectExternal headers computed from headers and other properties of Ditto protocol messages.
specificConfigobjectConfiguration which is only applicable for a specific connection type
clientCountnumberHow many clients on different cluster nodes should establish the connection
failoverEnabledbooleanWhether or not failover is enabled for this connection
validateCertificatesbooleanWhether or not to validate server certificates on connection establishment
mappingDefinitionsPayloadMappingDefinitionsList of mapping definitions where the key represents the ID of each mapping that can be used in sources and targets to reference a mapping.
Show child attributes
[key: string]PayloadMappingDefinitionA mapping definition consisting of the used mappingEngine and the options required by this engine.
Show child attributes
mappingEnginestringrequiredThe mapping engine used to process incoming and outgoing messages. Available mapping engines are
JavaScript, Normalized, ConnectionStatus, RawMessage, Ditto, ImplicitThingCreation, and UpdateTwinWithLiveResponse.
optionsobjectrequiredConfiguration options specific to the used mapping engine:
JavaScript
incomingScript(string, required): The mapping script for incoming messagesoutgoingScript(string, required): The mapping script for outgoing messagesloadBytebufferJS(boolean, optional): Whether or not ByteBufferJS library should be included (default:false)loadLongJS(boolean, optional): Whether or not LongJS library should be included (default:false)
Normalized
fields(string, optional): Comma separated list of fields included in the normalized message (default: all fields included)
ConnectionStatus
thingId(string, required): The ID of the thingfeatureId(string, optional): The ID of the modified feature (default:ConnectionStatus)
RawMessage
outgoingContentType(string, optional): The fallback content type for outgoing messages.incomingMessageHeaders(object, optional): The fallback headers for incoming messages containing the necessary information to map them to message commands and responses. The relevant header keys are:content-type,ditto-message-subject,ditto-message-direction,ditto-message-thing-id,ditto-message-feature-idandstatus. The header values may contain placeholder expressions.
Ditto
- no options required
ImplicitThingCreation
thing(object, required): The template of the thing to be implicitly created
UpdateTwinWithLiveResponse
dittoHeadersForMerge(object, optional): The Ditto headers to use for constructing the "merge thing" command for updating the twin, may for example add a condition to apply in order to update the twin (default ditto headers:response-required: false,if-match: "*").
incomingConditionsobjectOptional conditions to be checked before applying the mapping engine to inbound messages. Can use placeholders and functional expressions.
outgoingConditionsobjectOptional conditions to be checked before applying the mapping engine to outbound messages. Can use placeholders and functional expressions.
MappingContext to apply in this connection containing JavaScript scripts mapping from external messages to internal Ditto Protocol messages. Usage of MappingContext is deprecated, use PayloadMappingDefinitions instead.
Show child attributes
incomingScriptstringrequiredThe mapping script for incoming messages
outgoingScriptstringrequiredThe mapping script for outgoing messages
loadBytebufferJSbooleanrequiredWhether or not ByteBufferJS library should be included
loadLongJSbooleanrequiredWhether or not LongJS library should be included
sshTunnelobjectThe configuration of a local SSH port forwarding used to tunnel the connection to the actual endpoint.
Show child attributes
enabledbooleanrequiredWhether the tunnel is enabled
trueuristringrequiredThe URI of the SSH host in the format ssh://[host]:[port].
ssh://some.host:2222credentialsobjectrequiredThe credentials used to authenticate at the SSH host. Password and public key authentication are supported.
Show child attributes
typestringpasswordpublic-keyrequiredThe type of credentials used to authenticate. Either password or public-key.
passwordusernamestringrequiredThe username used for the authentication.
user42passwordstringThe password used for authentication when credentials type password is used.
secret!publicKeystringPublic key in PEM base64-encoded format using X.509 syntax. This field is required for credentials type
public-key.
-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----
privateKeystringPrivate key in PEM base64-encoded format using PKCS #8 syntax. This field is required for credentials type
public-key.
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
validateHostbooleanWhether the SSH host is validated using the provided fingerprints.
trueknownHostsArray<string>A list of accepted public key fingerprints. One of these fingerprints must match the fingerprint of the public key the SSH host provides.
[
"MD5:e0:3a:34:1c:68:ed:c6:bc:7c:ca:a8:67:c7:45:2b:19"
]tagsArray<string>The tags of the connection
The request could not be completed.
Response fields application/json
statusintegerrequiredThe HTTP status of the error
errorstringrequiredThe error code of the occurred exception
messagestringrequiredThe message of the error - what went wrong
descriptionstringA description how to fix the error or more details
hrefstringA link to further information about the error and how to fix it
The request could not be completed due to missing authentication.
Response fields application/json
statusintegerrequiredThe HTTP status of the error
errorstringrequiredThe error code of the occurred exception
messagestringrequiredThe message of the error - what went wrong
descriptionstringA description how to fix the error or more details
hrefstringA link to further information about the error and how to fix it
The request could not be completed due to an invalid authentication.
Response fields application/json
statusintegerrequiredThe HTTP status of the error
errorstringrequiredThe error code of the occurred exception
messagestringrequiredThe message of the error - what went wrong
descriptionstringA description how to fix the error or more details
hrefstringA link to further information about the error and how to fix it
The request could not be completed. Connections not found.
Response fields application/json
statusintegerrequiredThe HTTP status of the error
errorstringrequiredThe error code of the occurred exception
messagestringrequiredThe message of the error - what went wrong
descriptionstringA description how to fix the error or more details
hrefstringA 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.