{"__v":2,"_id":"5715265db54f5c1900768719","category":{"project":"57151dca3b689d20001d20ff","version":"57151dca3b689d20001d2102","_id":"57151dca3b689d20001d2103","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-18T17:47:54.371Z","from_sync":false,"order":9999,"slug":"documentation","title":"Documentation"},"project":"57151dca3b689d20001d20ff","user":"5564f227f0f70f0d00a9ab20","version":{"__v":2,"_id":"57151dca3b689d20001d2102","hasDoc":true,"hasReference":true,"project":"57151dca3b689d20001d20ff","createdAt":"2016-04-18T17:47:54.351Z","releaseDate":"2016-04-18T17:47:54.351Z","categories":["57151dca3b689d20001d2103","5715202cb54f5c19007686f4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-18T18:24:29.459Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"properties:\\n  subject: 'meshblu.request'\\n  correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\\n  replyTo: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.response'\\napplicationProperties:\\n  jobType: 'CreateSubscription'\\n  toUuid: 'eb232d93-f564-4f0d-a8d8-2f6e36bc9301'\\nbody: '{\\\"emitterUuid\\\": \\\"eb232d93-f564-4f0d-a8d8-2f6e36bc9301\\\", \\\"subscriberUuid\\\": \\\"ca3b867c-cc46-4d40-a2b7-34259690dc38\\\", \\\"type\\\": \\\"broadcast.sent\\\"}'\",\n      \"language\": \"coffeescript\",\n      \"name\": \"Example Request (in CSON)\"\n    }\n  ]\n}\n[/block]\nThe server will then process the message, and send the response to the `replyTo` as the `subject` in the response message. The `correlationId` is used to match requests to responses.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"properties:\\n  subject: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.response'\\n  correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\\napplicationProperties:\\n  statusCode: 200\\nbody: '{}'\",\n      \"language\": \"coffeescript\",\n      \"name\": \"Example Response (in CSON)\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"create-subscription","type":"basic","title":"Create Subscription"}

Create Subscription


[block:code] { "codes": [ { "code": "properties:\n subject: 'meshblu.request'\n correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\n replyTo: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.response'\napplicationProperties:\n jobType: 'CreateSubscription'\n toUuid: 'eb232d93-f564-4f0d-a8d8-2f6e36bc9301'\nbody: '{\"emitterUuid\": \"eb232d93-f564-4f0d-a8d8-2f6e36bc9301\", \"subscriberUuid\": \"ca3b867c-cc46-4d40-a2b7-34259690dc38\", \"type\": \"broadcast.sent\"}'", "language": "coffeescript", "name": "Example Request (in CSON)" } ] } [/block] The server will then process the message, and send the response to the `replyTo` as the `subject` in the response message. The `correlationId` is used to match requests to responses. [block:code] { "codes": [ { "code": "properties:\n subject: 'ca3b867c-cc46-4d40-a2b7-34259690dc38.response'\n correlationId: '71027de4-f6ed-4431-b548-679fd1f5c154'\napplicationProperties:\n statusCode: 200\nbody: '{}'", "language": "coffeescript", "name": "Example Response (in CSON)" } ] } [/block]