blob: ffad170324f96880e2ff7e8a717270e0df3689dc [file] [log] [blame]
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "The Ditto Protocol response is sent in response to a command.",
"title": "Ditto Protocol response",
"properties": {
"topic": {
"type": "string",
"description": "Contains the same topic as the commands which this response correlates to."
},
"headers": {
"type": "object",
"description": "Additional headers.",
"properties": {
"correlation-id": {
"type": "string",
"description": "The correlation-id header is used for linking one message with another. It typically links a reply message with its requesting message."
},
"version": {
"type": "integer",
"description": "Determines the version of the *Things* payload.",
"minimum": 1,
"maximum": 2
}
},
"required": [ "correlation-id" ]
},
"path": {
"type": "string",
"description": "A Path that references a part of a Thing which is affected by this message.\nExamples:\n * `/feature/location/properties/longitude` (a single sensor value)\n * `/` (the whole Thing)"
},
"value": {
"type": ["object","string","number","array","boolean"],
"description": "The _value_ field contains the actual payload e.g. a sensor value."
},
"status": {
"type": "integer",
"description": "The status code that indicates the result of the command. The semantics of the used status codes are based on the [HTTP status codes](https://tools.ietf.org/html/rfc7231#section-6)."
}
},
"required": [ "topic", "headers", "path", "status" ]
}