Skip to content

06 Link Formats Hal Json Api Siren

DodaTech 1 min read

title: Hypermedia Link Formats — HAL, JSON API, and Siren weight: 16 date: 2026-06-28 lastmod: 2026-06-28 description: Compare hypermedia link formats including HAL (Hypertext Application Language), JSON API, and Siren for structuring links, embedded resources, and actions in APIs. tags: [api-development, hateoas]


Hypermedia link formats standardize how links and embedded resources are structured. HAL is the simplest with _links and _embedded. JSON API uses links objects with pagination. Siren includes actions with input fields and embedded entities.

```json
// HAL Format
{
    "_links": {
        "self": {"href": "/orders/42"},
        "customer": {"href": "/users/7"}
    },
    "_embedded": {
        "items": [
            {"_links": {"self": {"href": "/items/1"}}, "name": "Laptop", "price": 999}
        ]
    },
    "id": 42,
    "total": 999
}

// Siren Format
{
    "class": ["order"],
    "properties": {"id": 42, "total": 999.00},
    "entities": [
        {"class": ["item"], "rel": ["item"], "href": "/items/1"}
    ],
    "actions": [
        {"name": "cancel-order", "method": "DELETE", "href": "/orders/42"}
    ],
    "links": [
        {"rel": ["self"], "href": "/orders/42"}
    ]
}

What's Next

Now learn about dynamic discovery in Hypermedia APIs and HATEOAS.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro