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": "http://olympics.api.pressassociation.io/games/OWG2018/unit/LUGMSINGLES-----------FNL-000100--"
        },
        {
            "rel": "unit-result",
            "href": "http://olympics.api.pressassociation.io/games/OWG2018/unit/LUGMSINGLES-----------FNL-000100--/result"
        },
        {
            "rel": "phase",
            "href": "http://olympics.api.pressassociation.io/games/OWG2018/phase/LUGMSINGLES-----------FNL-"
        }
    ]
}

The table below shows what links you could see and where you are likely to see them.

ResourceLinkDescription
UnitselfA self link reference to the current unit.
unit-resultA link to this units result is available.
phaseA link to this units phase detail endpoint.
phase-resultA link to this phase result if available.
PhaseselfA self link reference to the current phase.
phase-resultA link to this phase result if available.

What’s Next