I have an entity stored in the backend which translates to the json format as,
{
"id": 123,
"name": "test",
"key": "test1",
"description": "",
"models": [
{
content
},
{
content
}
]
}
So when i want to retrieve the list of elements using the api
GET /elements
Should i return the elements metadata only(id, name, descriptions) or should also include the content(models[])?
CodePudding user response:
Normally
GET /elements
would return a list of complete entities.
You could add another endpoint:
GET /elements/meta
or GET /elements?mode=meta
which would return a List of the metadata only.