Answer the question
In order to leave comments, you need to log in
Are there any examples of implementing "nested" APIs in Yii2?
There are just a huge number of examples of API implementation on the Internet:
1) api/users/{user_id}/posts/{post_id}/comments/{comment_id} everything is simple and clear here.
2) But there are also api documentation examples where data is nested in a shared object:
api/user
{
"id": 1,
"user_email": "[email protected]",
"posts": [
{
"id": 1,
"text": "....",
"comments": [
{
"id": 1,
"author": "guest",
"message": "..."
}
]
}
]
}
Answer the question
In order to leave comments, you need to log in
The first is used for updating, deleting, adding data, the second for displaying. What is the question then?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question