Connection targets

A connection will send messages and events to the targets configured within the connection. A target configuration comprises the address and the authorization.

tip Find examples at https://www.eclipse.org/ditto/basic-placeholders.html

Supported placeholders for addresses

Thing placeholders

{{ thing:id }}

The full ID is composed of a namespace, a colon as a separator, and a name.

thingId = <namespace> + ":" + <thing-name>

Example my.namespace:thing-01


{{ thing:namespace }}

The namespace is the first part of the thing ID.


{{ thing:name }}

The thing name is the second part of the thing ID.


Topic placeholders

The Ditto protocol defines a topic for each protocol message having following structure:

{namespace}/{entityId}/{group}/{channel}/{criterion}/{action}

Example my.namespace/thing-01/things/live/events/modified

{{ topic:full }}

The placeholder is resolved into the full Ditto protocol topic path.

See https://www.eclipse.org/ditto/protocol-specification-topic.html


{{ topic:namespace }}

The placeholder is resolved into the Ditto protocol namespace.


{{ topic:entityId }}

The placeholder is resolved into the Ditto protocol entity ID.


{{ topic:group }}

Ditto protocol group

See https://www.eclipse.org/ditto/protocol-specification-topic.html#group


{{ topic:channel }}

The placeholder is resolved into the Ditto protocol channel.


{{ topic:criterion }}

The placeholder is resolved into the Ditto protocol criterion.


{{ topic:action }}

The placeholder is resolved into the Ditto protocol action.


{{ topic:subject }}

The placeholder is resolved into the Ditto protocol subject (for message commands).


{{ topic:action-subject }}

Placeholder for a Ditto protocol action or subject (for message commands)


Header placeholders

Header placeholders allow accessing any external or Bosch IoT Things protocol header.

{{ header: }}

This placeholder supports any external protocol header or Things header.

Examples

{{ header:correlation_id }}

{{ header:device_id }}

Placeholder functions

fn:default( defaultValue)

This placeholder function will pass the defaultValue if the previous expression in a pipeline has been resolved to empty (e.g. due to a non-defined header placeholder key).

Another placeholder may be specified, which is resolved to a string and inserted as defaultValue.

Examples

{{ header:my-optional-header | fn:default('fallback') }}

{{ header:my-optional-header | fn:default("fallback") }}

{{ thing:name | fn:substring-before(':') | fn:default(thing:name) }}


fn:substring-before( givenString)

This placeholder function will parse the result of the previous expression, then it will pass along only the characters before the first occurrence of the givenString.

If givenString is not contained, this function will resolve to empty.

Examples

{{ thing:id | fn:substring-before(':') }}

{{ thing:id | fn:substring-before(":") }}

{{ thing:name | fn:substring-before(':') | fn:default(thing:id) }}


fn:substring-after( givenString)

This placeholder function will parse the result of the previous expression, then it will pass along only the characters after the first occurrence of givenString.

If givenString is not contained, this function will resolve to empty.

Examples

{{ thing:id | fn:substring-after(':') }}

{{ thing:id | fn:substring-after(":") }}

{{ thing:name | fn:substring-after(':') | fn:default(thing:id) }}


fn:lower()

This placeholder function makes the string result of the previous expression lowercase in total.

Examples

{{ thing:name | fn:lower() }}


fn:upper()

This placeholder function makes the string result of the previous expression uppercase in total.

Examples

{{ thing:name | fn:upper() }}


Supported placeholders for header mappings

Header mappings

  subject ⇾ {{ topic:action-subject }}
  content-type ⇾ application/vnd.eclipse.ditto+json
  message-id ⇾ {{ header:correlation-id }}
  reply-to ⇾ control/fhgfghg/replies

Thing placeholders

see above

Topic placeholders

see above

Header placeholders

see above

Subject ID placeholder

{{ request:subjectId }}

This placeholder resolves to the authorization subject that issued the command or caused the event.

Placeholder functions

see above

Imprint Legal info Privacy statement