Skip to content
uencoder

HAL

HAL (Hypertext Application Language) is a REST hypermedia format that expresses links between resources in JSON/XML through _links and _embedded.

Purpose

To provide a hypermedia link standard for REST APIs so clients can discover follow-up actions through links, decoupling API evolution.

Mechanism

A resource object contains _links (a rel to {href,method,...} mapping) and _embedded (inlined related resources). A link's rel identifies the relation type, and clients navigate by rel instead of hard-coded URLs.

Use cases

  • REST hypermedia APIs
  • API self-discovery
  • Links between microservices

Related tools

References