Models
PayloadMappingDefinition
objectA mapping definition consisting of the used mappingEngine and the options required by this engine.
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.