Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

If you decide to push your data per API you have to use the API route /api/sources. This route can automatically decide if an entry needs to be created or updated - as long as the id is unique - over every source.

To create an entry use the following request:

POST /api/sources/:sourceName

The value :sourceName inside the API call must be adopted to your custom source name. The source name must be in lowercase.

Request Body:

{
    "id": "EM2008-31",
    "name": "EM 2008 - Final",
    "data": {
        "Opponents": "Germany - Spain",
        "KickOff": "2008-06-29T20:45:00",
        "Result": "0:1",
        "Venue": "Ernst-Happel-Stadion, Vienna",
        "Weather": "Sunny, 27 °C (81 °F), 4% humidity",
        "Referee": "Roberto Rosetti (ITA)"
    }
}

Excerpt: this request body will create a basic entry.

  • No labels