GET /articles HTTP/1.1
Accept: application/vnd.api+json
{
“data”: {
“type”: “articles”,
“id”: “1”,
“attributes”: {…},
“relationships”: {…},
“links”: {…},
}
“meta”: {…}
}
{
…
“attributes”: {
“title”: “Drupal 8!”,
“body”: “Lorem ipsum”
…
},
…
}
❌ Multiples request para multiples recursos
❌ Execeso de informacion
❌ Multiples request para multiples recursos
GET /articles/12?
include=author,author.pic,
tags,
comment,comment.author,
comment.author.pic
GET /articles/12?
fields[node--articles]=
title,
created
GET /articles/12?
filter[field_tags.name][value]=Drupal&
filter[author.name][value]=editor&
include=field_tags,field_tags.name,comments&
fields[comments]=name,albums,members