Formula 1
One of the most important examples of stage strucutured sport in UOF is Formula 1.
We will report below an example of how to get info related to races in such a case of stage structure.
First of all let's introduce the concept of parenting among stages.
The are stages which are parents of other stages which on their side can be parent of child stages as reported in image below:

Using the "All sports" end point we can retrieve the ID of the Formula 1 sport which is 40 as shown below.
Once we get the ID of the sport then we can use the end point "All available tournament for a sport" filtering by using sport id=40 and we can get the following xml:
As we can see from the response of the end point the tournaments filtered by sport have the following id: "sr:stage:547803" and "sr:stage:686252" so in case of Formula 1 the structure is organized into stages.
This was the first step in order to identify the stages for Formula 1.
Let us consider now is the second stage i.e. "sr:stage:686252".
This is a parent stage which will have several child stages below it.
In order to retrieve all the stages related to this one we can use the "Schedule for a Tournament" end point filtering by stage 686252.
The result will be the one shown in the following example i.e. the list of all the stages contained in 686252.
The answer of the end point shows that they are all parent stage which means they have child stages below them.
Once we have retrieved all the stages below Formula 1 2021 (which are all Grand Prix) we can go deeper and get more detailed info for each of them.
Let's use as an example the first one above: 699614
As we can see in the answer of the end point we get listed the id of the child stage and the info if we are talking about practice, qualiyfing or race.
We can go again deeper and filter the first stage 699616 in the fixture end point and we will get more detailed info related to the stage.
It is very important to keep in mind that the dates provided in the end points can be taken into consideration for outrights but the best way in order to get dates related to outrights is to use the AMQP message related where the dates are
reported exactly for the specific outright.
Last updated
Was this helpful?