Skip to main content

Response Format

Horizon delivers responses as JSON objects formatted according to HAL. The HAL format makes Horizon more explorable, paginates responses, and connects parent and child resources. Consuming this format is simple using one of the many open source libraries available for most major programming languages.

HAL is just JSON with two reserved attribute names:

  • _links
  • _embedded

If a response is a single record, the _links section will provide links to any parent or child records, and there will be no _embedded property.

If a response is a collection, the _links section will provide pagination links, and the response’s list of records will be nested underneath the _embedded property.

  • ATTRIBUTESDATA TYPE

    DESCRIPTION

  • _linksarray

    Provides links for navigating to other pages or to parents and children.

  • _embeddedarray

    Present when querying an endpoint that responds with a collection of records.