Skip to content

Data Endpoints

Providing these endpoints allows you to have access to live data when editing the template, helping you to create rich and comprehensive texts, as well as to generate content with a simple GET request. To set this up you must provide two endpoints: One for searching your data subjects (Search Endpoint), and one for getting the actual data (Data Endpoint).

Note

It is not necessary to implement these endpoint, when using the POST version of the generation endpoint. See the Custom Data Source overview for an explanation of the differences.

The Search Endpoint

This endpoint takes query, and returns a list of Content References, which must look like this:

[{
    "Id": "123102387", // String
    "ReferenceName": "Real Madrid 1 - 2 Barcelona", // Display name
    "ReferenceDescription": "Location: Santiago Bernabéu", // Optional description
    "Time": "2020-01-01T00:00:00" // Optional time
}]

The endpoint must return a JSON List/array of these, and must take a query parameter named query which is the search string, as well as an optional page and pagesize, for example like this:

https://mysoccerservice.com?query=Barcelona&page=1&pageSize=10

The Data Endpoint

The data endpoint takes a queryparameter named id, which is the id returned from the search endpoint:

https://mysoccerservice.com?id=123102387

See the Data Format page for a specification of how to structure the data that the endpoint provides.