11 LIST REPRESENTATION
The List representation consists of a list of links to domain object §C14 or domain service §C15 resources. Typically it is obtained as the result of invoking a query action, when it is in-lined within the action result representation §C19.4. It is also be obtained directly from the Services resource §B7, when it provides a list of links to domain service resources; the only difference is that the "href" will be a link to a domain service resource §C15 rather than a domain object resource §C14.
The media type for a list representation will always be one of:
-
application/json;profile="…/list"
-
for a list of references to domain services
-
-
application/json;profile="…/action-result";x-ro-element-type="…"
-
when in-lined within an action result (ie the representation of an action invocation that returned a list).
-
Lists of references to domain objects also appear in the object-collection representation; that representation is described in full in §C17.5.
The representation itself consists of the following json-properties:
{
"value": [
...
],
"links": [ {
"rel": "self",
...
}, {
"rel": ".../element-type",
...
},
],
"extensions": { ... }
}
where:
JSON-Property | Description |
---|---|
links |
list of links to resources. |
links[rel=self] |
(optional) link to the resource that generated this list. Present only for domain services. |
links[rel=…/element-type] |
link to the domain type for the elements within the list – if the "domainModel" optional capability §B8 is implemented. |
value |
the actual list of links to the domain object resources (or domain service resources) |
extensions |
additional information about the resource. |
A "self" link will be present only if the representation was generated from the domain services resource §B7.
Restful Objects defines no standard child properties of the "extensions" json-property. Implementations are free to add to their own links/json-properties to "links" and "extensions" as they require.