I want to create relations between Post and Tag as follows.
I created collection types for Post and Tag.
Set them accessible for public user.
I created 1 post with 3 tags.
Now, when I try to see them at http://localhost:1337/api/posts I don’t see nested elements, i.e. tags… Am I missing anything ?
And lastly, I was not able to create Many-to-Many relations between Post and Tag with the following error. I understand that Tags field already exists, but I thought this is how supposed to be set.
I got reply from Strapi forum, so decided to share here.
According to the docs above, to pull (in my case) 1st level nested elements I have to add populate[0]
parameter like so:
http://localhost:1337/api/posts?populate[0]=tags