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.

Restish can extract links from sources such as:

  • HTTP Link headers
  • HAL-style _links, including arrays of HAL resources
  • JSON:API-style top-level links and resource links.self
  • Siren links
  • JSON-LD or TSJ @id
  • simple REST-ish self fields 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.

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready
restish links api.rest.sh/images next self

Filter links from a normal request:

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready
restish api.rest.sh/images -f links.self

Automatic pagination follows normalized next links. Disable it when you want to inspect only the first page:

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready