Inclusion of Related Resources¶
Side-loading allows you to retrieve related records as part of a single request, and to define which related resources should be returned. Includes are specified with the include
parameter. The response will include a top-level object relationships
with associated data under the appropriate resource key.
http
GET /v3/dids?include=trunk HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json
curl
curl -i 'https://api.didww.com/v3/dids?include=trunk' -H 'Accept: application/vnd.api+json'
Multiple related resources may be returned by adding several include parameters to a single URL.
http
GET /v3/dids?include=trunk.did_group HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json
curl
curl -i 'https://api.didww.com/v3/dids?include=trunk.did_group' -H 'Accept: application/vnd.api+json'
Includes may also be applied to relations of included objects.
http
GET /v3/dids?include=trunk.trunk_group HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json
curl
curl -i 'https://api.didww.com/v3/dids?include=trunk.trunk_group' -H 'Accept: application/vnd.api+json'