A hypertext link is a response-provided reference to a related resource or available API action. In Spring Data REST responses, these links implement HATEOAS and can guide clients through an API without hard-coding every URL. section 7.2
Links in an ingredients response
A GET request to /ingredients can return each ingredient with self and ingredient links, plus collection-level self and profile links. A client may follow a named link for its next request. section 7.2
$ curl localhost:8080/ingredients
{
"_embedded" : {
"ingredients" : [ {
"name" : "Flour Tortilla",
"type" : "WRAP",
"_links" : {
"self" : {
"href" : "http://localhost:8080/ingredients/FLTO"
},
"ingredient" : {
"href" : "http://localhost:8080/ingredients/FLTO"
}
}
},
...
]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/ingredients"
},
"profile" : {
"href" : "http://localhost:8080/profile/ingredients"
}
}
}
Inspect the Spring Data REST response structure, including embedded resources and _links containing href values. section 7.2
Hypertext links balance convenience with cost:
- They let clients discover API navigation from responses instead of constructing every URL themselves. section 7.2
- They add payload data and require clients to understand link-based navigation, so clients may ignore them. section 7.2








