If no identifier is specified in the request, such as
/resource, then response will be a List response. The List format will be used even if the list contains only one item. If the list is empty, you will still receive a response in the List format with an empty
The List data model is adapted from the HAL specification.
List of links that may be used to interact with the list, such as a link to the next page, last page, etc.
|_metadata||Additional metadata describing the list, such as a count of the records in the list.|
|array||An array of the items in the list. The type of item is determined by the resource requested.|
Consider a request for a list of pets. The response may look something like this.
List of links that can be used to interact with the collection. Only links that are valid for the current state of the collection will be included in the response.
Metadata is information about the state of a the list itself.
Examples of metadata are things like the count of items returned in the list. This will also include information for pagination, when implemented, such as page count, number of pages, etc.
|number||Count of the items in the list that match the search criteria. If paginated, this is the count of the entire list, not the count of items in this response.|
List style response for requests which may return multiple items