Download OpenAPI specification:Download
Group: Example
Definition: Example Project to document Server Sent Events.
Description: This example attempts to improve the flexibility of Server Sent events and the documentation of those events. This particular ADF is ONLY to show the layout and contents and events. It is not to be used as an actual API resource.
Referenced Standards:
Scope: OpenRetailing
The 'event:' header in each SSE must be one of the following:
enum:
Note: This type must be copied manually from the enumeration in '../schemas/apiEventDefinitions.yaml'
This definition is NOT a POST event. It uses the POST format to document the "data:" property content
In the Dropdown just above:
* Choose 'application/text' to show a sequence of SSEs in the box on the right, each with a different defined event. While in the definition area below it says "Schema not provided", you can view the schema by selecting 'application/json' in the droptdown just above.
* Choose 'application/json' to show the definitions of the event data content. While the example to the right is empty, the definitions will appear in the area below.
Note that the schema definitions ONLY describe the contents of the "data:" event line of the event. To see the SSE event stream example in context, choose the 'application/text' dropdown above.
The '200' return on the right is an artifact of documentation, and doesn't have significance.
id: 340 event: masterChanges data: {"eventID": "340","event": "masterChanges","timestamp":"2021-11-29T17:11:37.167Z","changes":{"country": "GB", "merchantID":"e0d60cdd-024d-4b41-80b1-1dc0e5142c26","changeType":"New","changedObject":"sites"}} id: 187 event: trxStateChange data:{"eventID": "187","event": "trxStateChange","timestamp":"2021-11-29T17:11:37.167Z","trxUmti":"968b12ea-caa5-1921-ecec-4cb5503d6266", "trxState":"InProgress"}
{ }