-
Notifications
You must be signed in to change notification settings - Fork 18
Wrp.RequestResponse
Weston Schmidt edited this page Aug 8, 2018
·
3 revisions
(Warning - work in progress)
This message is designed to be used for simple request response transactions. Unless you are talking to an interface the supports the CRUD behavior message types, this is likely how you will interact with a component.
{
"msg_type": 3,
"source": "dns:my-great-service.com",
"dest": "mac:112233445566/device-service/extra-parameters",
"content_type": "",
"accept": "",
"transaction_uuid": "",
"status": 200,
"rdr": 0,
"partner_ids": [
"foo"
],
"headers": [
"header1: super cool"
],
"metadata": {
"/favorite-color": "red"
},
"spans": [],
"include_spans": true,
"payload": ""
}
MsgPack/Json Name | HTTP Header Name | Required | Description |
---|---|---|---|
msg_type |
X-Xmidt-Message-Type |
required | The message type for the request-response. (SHALL be 3 in msgpack, SimpleRequestResponse as HTTP header.) |
source |
X-Xmidt-Source |
required | The device_id name of the device originating the request or response. |
dest |
X-Xmidt-Dest |
required | The device_id name of the target device of the request or response. |
content_type |
X-Xmidt-Source |
optional | The media type of the payload. |
accept |
X-Xmidt-Accept |
optional | The media type accepted in the response. |
transaction_uuid |
X-Xmidt-Transaction-Uuid |
required | The transaction key for the request and response. The requester may have several outstanding transactions, but must ensure that each transaction is unique per destination. This SHOULD be a UUID, but the web router SHALL NOT validate this data. The web router SHALL treat this data as opaque. |
status |
X-Xmidt-Status |
optional | The response status from the originating service. Not included in the during the request. |
rdr |
X-Xmidt-Rdr |
optional | The request delivery response is the delivery result of the previous (implied request) message with a matching transaction_uuid . |
partner_ids |
X-Xmidt-Partner-Ids |
optional | The list of partner ids the message is meant to target. If the item is missing and the device has a partner id or the device does not find a match, the request shall be disregarded & a response with status of 403 sent back to the sender. |
headers |
X-Xmidt-Headers |
optional | The headers associated with the payload. |
metadata |
X-Xmidt-Metadata |
optional | The map of name/value pairs used by consumers of WRP messages for filtering & other purposes. |
spans |
X-Xmidt-Spans |
optional | An array of arrays of timing values as a list in the format: "name", "start time", "duration" |
include_spans |
optional | If the timing values should be included in the response. | |
payload |
n/a | optional | The MsgPack bin format packed data. |
Code | Description |
---|---|
0 | Delivered |
TBD | The rest are TBD today. |