Schema
What does the notification message look like?
The notification message contains all the relevant information to inform a client which endpoint has updated.
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "event",
"url": "http://sport.api.press.net/v1/event/2112825?ts=1453195816",
"event": {
"id": 2112825,
"name": "Roger vs Tim",
"status": "Finished",
"date": "2016-01-19T09:32:55Z"
},
"stage": {
"id": 21413,
"name": "Cup"
},
"tournament": {
"id": 13444,
"name": "Tennis Cup"
},
"season": {
"id": 551,
"name": "2016"
},
"sport": {
"id": 3,
"name": "Tennis"
},
"_ts": 1453195816
}
Key (JsonPath) | Description | Example/Values |
---|---|---|
$.operation | Notification Operation | create update * delete |
$.timestamp | Creation time | 2016-01-19T09:32:55Z |
$.type | Type of Entity Updated | sport country venue tournament season stage draw standing event event:actions * event:composition |
$.url | URL to retrieve latest entity | http://sport.api.press.net/v1/event/2112825?ts=1453195816 |
$.event | Event Entity | Entity* |
$.stage | Stage Entity | Entity* |
$.tournament | Tournament Entity | Entity* |
$.season | Season Entity | Entity* |
$.sport | Sport Entity | Entity* |
$._ts | Unix Timestamp | 1453195816 |
_ts
Used to cache bust API requests to allow the most up to date data.
The following table defines the Entity* Properties.
Key | Description | Example |
---|---|---|
id | Entity ID | 2112825 |
name | Entity Name | Roger vs Tim |
status | Optional Status value* | Finished |
date | Option Date for Entity* | 2016-01-19T09:32:55Z |
Optional Values
status and date are only available on the Event type notifcations
Browse the tabs below to see some real examples of the notification messages.
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "tournament",
"url": "http://sport.api.press.net/v1/tournament/156?ts=1453195816",
"tournament": {
"id": 156,
"name": "ATP"
},
"sport": {
"id": 2,
"name": "Tennis"
}
"_ts": 1453195816
}
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "stage",
"url": "http://sport.api.press.net/v1/stage/841267?ts=1453195816",
"stage":{
"id": 841267,
"name": "Delray Beach International Tennis Championships"
},
"season": {
"id": 9773,
"name": "2016"
},
"tournament": {
"id": 156,
"name": "ATP"
},
"sport": {
"id": 2,
"name": "Tennis"
}
"_ts": 1453195816
}
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "draw",
"url": "http://sport.api.press.net/v1/draw/7433?ts=1453195816",
"draw":{
"id": 7433,
"name": "BDO World Championship Male Single"
},
"season": {
"id": 9985,
"name": "2016"
},
"tournament": {
"id": 9280,
"name": "BDO World Championship 1"
},
"sport": {
"id": 77,
"name": "Darts"
},
"_ts": 1453195816
}
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "standing",
"url": "http://sport.api.press.net/v1/standing/27743?ts=1453195816"
"standing":{
"id": 27743,
"name": "FIFA World Ranking (male)"
},
"sport": {
"id": 1,
"type": "Soccer"
},
"_ts": 1453195816
}
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "event",
"url": "http://sport.api.press.net/v1/event/2112825?ts=1453195816",
"event":{
"id": 2112825,
"type": "event",
"status": "Finished",
"date": "2015-10-04T20:00:00+0000"
},
"stage": {
"id": 838880,
"name": "World Grand Prix"
},
"season": {
"id": 9190,
"name": "2015"
},
"tournament": {
"id": 9279,
"name": "World Grand Prix 1"
},
"sport": {
"id": 77,
"name": "Darts"
},
"_ts": 1453195816
}
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "event:actions",
"url": "http://sport.api.press.net/v1/event/1992996/actions?ts=1453195816",
"event":{
"id": 2112825,
"type": "event",
"status": "Finished",
"date": "2015-10-04T20:00:00+0000"
},
"stage": {
"id": 838880,
"name": "World Grand Prix"
},
"season": {
"id": 9190,
"name": "2015"
},
"tournament": {
"id": 9279,
"name": "World Grand Prix 1"
},
"sport": {
"id": 77,
"name": "Darts"
},
"_ts": 1453195816
}
{
"operation": "update",
"timestamp": "2016-01-19T09:32:55Z",
"type": "event:composition",
"url": "http://sport.api.press.net/v1/event/2112825/composition?ts=1453195816",
"event":{
"id": 2112825,
"type": "event",
"status": "Finished",
"date": "2015-10-04T20:00:00+0000"
},
"stage": {
"id": 838880,
"name": "World Grand Prix"
},
"season": {
"id": 9190,
"name": "2015"
},
"tournament": {
"id": 9279,
"name": "World Grand Prix 1"
},
"sport": {
"id": 77,
"name": "Darts"
},
"_ts": 1453195816
}
Updated over 6 years ago