Strapi CMS third level populating

Viewed 835

I have a problem with fetching third level data from Strapi CMS.

My Structure is the following:

Page > Content(Dynamic Zone) > Multiple Entitys e.g. HeroSliderElement.

So Calling this URL from Postman:

{{protocol}}://{{host}}:{{port}}/api/pages?populate[Content][populate]=*

But since inside my HeroSliderElement are images i have the problem, that i dont get these back.

Request Detail There should be the media data linked from the CMS:

enter image description here

Does anyone have an Idea how to fix this? Any help is appreciated!

I am currently using the following versions of packages:

  "dependencies": {
"@strapi/plugin-i18n": "4.0.7",
"@strapi/plugin-users-permissions": "4.0.7",
"@strapi/provider-upload-aws-s3": "^4.1.0",
"@strapi/strapi": "4.0.7",
"pg": "8.6.0",
"strapi-provider-upload-aws-s3": "^3.6.8"

},

3 Answers

you need to specify every record(object, entity) at level three to fetch data from it. like as you said you want to fetch data of images from content from your this will work

{{protocol}}://{{host}}:{{port}}/api/pages?populate[Content][populate]=images

Install the official strapi plugin : strapi-plugin-populate-deep , its easy and great plugin for nested content structure, it worked for me.

Examples: Populate a request with the default max depth.

/api/articles?populate=deep

Populate a request with the a custom depth

/api/articles?populate=deep,10

Populate a request with the a custom depth

/api/articles/1?populate=deep,10
Related