Links and Hypermedia
Inspect normalized links from headers and response bodies.
Restish normalizes hypermedia links so filters, pagination, and the links
command can use one shape even when APIs expose links differently.
Recognized Link Sources
Restish can extract links from sources such as:
- HTTP
Linkheaders - HAL-style
_links, including arrays of HAL resources - JSON:API-style top-level
linksand resourcelinks.self - Siren links
- JSON-LD or TSJ
@id - simple REST-ish
selffields on top-level objects or nested array items
The exact source matters less to users than the normalized result: relation
names such as self, next, and prev become queryable under links.
Nested array item links use relation names based on the field, such as
things-item.
Inspect Links
restish links api.rest.sh/images next self
Filter links from a normal request:
restish api.rest.sh/images -f links.self
Pagination Uses Links
Automatic pagination follows normalized next links. Disable it when you want
to inspect only the first page: