Thing Schema

A RapidMiner Thing schema is required to have an @type that starts with swx:rapidminer.

The scoringAgentID, basePath, and endpointPath configuration values can either be defined in the @type as a comma separated list (shown in the example) or they can be defined as properties object called config (as shown in the example) for which the values can be dynamically set. If the @type mechanism is used the config property object should be omitted.

The executeService action and event are required and used to execute a scoring agent service. Set sendAsTelemetry to false to have the response come up as an event. The response will include a data object with key value pairs.

These keys can be used to define properties on the schema. For example, if the response includes a "temperature": 37.3 key-value pair then a property called temperature could be defined on the thing schema with type set to number.

If properties have been defined like this on the schema, then using sendAsTelemetry set to true will publish the result as property value updates instead of an event.

{
	"@type": [
		"swx:rapidminer,scoringAgentID=,basePath=,endpointPath="
	],
	"actions": {
		"executeService": {
			"input": {
				"type": "object",
				"properties": {
					"requestBody": {
						"type": "string"
					},
					"sendAsTelemetry": {
						"type": "boolean",
						"default": true
					}
				}
			},
			"title": "Execute Service"
		}
	},
	"description": "",
	"events": {
		"executeService": {
			"data": {
				"type": "string"
			},
			"title": "Execute Service Result"
		}
	},
	"properties": {
		"config": {
			"properties": {
				"scoringAgentID": {
					"type": "string"
				},
				"basePath": {
					"type": "string"
				},
				"endpointPath": {
					"type": "string"
				}
			},
			"type": "object"
		},
		"enabled": {
			"type": "boolean"
		},
		"verification-status": {
			"type": "string"
		}
	},
	"title": "rapidminer thing"
}