Links
What do relationships between resources look like.
HATEOS links are used throughout the Olympics API to identify optional relationships when they are needed.
The API does not support full HATEOS links but this pages identifies where you can expect to see links.
The main resource that exposes the links is the Unit Resource. We use the links in this instance to display when results are available.
Example can be seen below.
{
"code": "LUGMSINGLES-----------FNL-000100--",
"description": "Men's Singles Run 1",
"start": "2017-09-11T00:40:00Z",
"end": "2017-09-11T01:40:00Z",
,,,
"link": [
{
"rel": "self",
"href": "https://olympics.api.pamedia.io/v3/games/OWG2018/unit/LUGMSINGLES-----------FNL-000100--"
},
{
"rel": "unit-result",
"href": "https://olympics.api.pamedia.io/v3/games/OWG2018/unit/LUGMSINGLES-----------FNL-000100--/result"
},
{
"rel": "phase",
"href": "https://olympics.api.pamedia.io/v3/games/OWG2018/phase/LUGMSINGLES-----------FNL-"
}
]
}
The table below shows what links you could see and where you are likely to see them.
Resource | Link | Description |
---|---|---|
Unit | self | A self link reference to the current unit. |
unit-result | A link to this units result is available. | |
phase | A link to this units phase detail endpoint. | |
phase-result | A link to this phase result if available. | |
Phase | self | A self link reference to the current phase. |
phase-result | A link to this phase result if available. |
Updated 6 months ago
What’s Next