Allows authenticated customers to receive XML messages in near realtime which contain race data from Swedish Trotting Association and Swedish Gallop.
The channels API emulates push technology by using long polling. The client polls the server requesting new information. The server holds the request open until new data is available. Once available, the server responds and sends the new information. When the client receives the new information, it immediately sends another request, and the operation is repeated.
The server will not wait indefinately for new information. If no new information arrives within a set time limit, the server will issue an empty response with status 204. Following this, the client should immediately make a new request to continue waiting for information.
Missed messages will be stored on a queue for up to 24 hours, or until the client is reconnected.
Internally, Race Data API sends messages on different channels. All messages are delivered on the same endpoint, but you will only receive messages from the channels which are included in your subscription agreement.
GET https://api.travsport.se/customerapi/channels/listen
authorization (required) string - Bearer token
| Status | Result |
|---|---|
| 200 OK |
Body application/json String representing an XML document. Store, and make a new request. |
| 204 Success |
No content Timeout while waiting for information. Make a new request. |
| 400 Not found |
Bad request Check input |
| 401 Not authenticated |
The user is not authenticated |
| 403 Forbidden |
The user is not authorized |
| 500 Internal server error |
An unexpected error occurred while processing the request |
| 501 Not implemented |
The requested operation is not supported |