I am trying to make a simple GET request to a local headless cms (strapi). In principle the request works, I get information about the title etc. what I don’t get is the url of the images that are in the article. I tried ‘popualte=*’, but then I only get the info that there is a linked media file in the blocks.
{
"data": {
"id": 30,
"documentId": "msyhpknnmyjgj4jf3lim7p0q",
"title": "Artikel 01",
"description": "Das ist ein Artikel",
"slug": "beautiful-picture",
"createdAt": "2025-07-11T09:25:02.448Z",
"updatedAt": "2025-07-11T12:35:17.398Z",
"publishedAt": "2025-07-11T12:35:17.426Z",
"blocks": [
{
"__component": "shared.media",
"id": 29
},
{
"__component": "shared.media",
"id": 30
},
{
"__component": "shared.rich-text",
"id": 27,
"body": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
},
{
"__component": "shared.media",
"id": 31
}
]
},
"meta": {}
}
unfortunately does not work either, i get this error message in cmd:
[2025-07-17 13:11:39.548] error: Invalid nested population query detected. When using ‘populate’ within polymorphic structures, its value must be ‘*’
to indicate all second level links. Specific field targeting is not supported here. Consider using the fragment API for more granular population control.
Error: Invalid nested population query detected. When using ‘populate’ within polymorphic structures, its value must be ‘*’ to indicate all second level links.
Specific field targeting is not supported here. Consider using the fragment API for more granular population control.
at C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\@strapi\utils\dist\convert-query-params.js:220:27
at Array.reduce (<anonymous>)
at convertPopulateObject (C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\@strapi\utils\dist\convert-query-params.js:176:41)
at convertPopulateQueryParams (C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\@strapi\utils\dist\convert-query-params.js:161:20)
at Object.transformQueryParams [as transform] (C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\@strapi\utils\dist\convert-query-params.js:480:30)
at Array.<anonymous> (C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\@strapi\core\dist\services\document-service\transform\query.js:6:46)
at Array.l (C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\lodash\lodash.min.js:58:213)
at C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\@strapi\utils\dist\async.js:11:34
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async findOne (C:\xampp\htdocs\strapi-custum-api-endpoint\node_modules\@strapi\core\dist\services\document-service\repository.js:78:25)
[2025-07-17 13:11:39.549] http: GET /api/articles/msyhpknnmyjgj4jf3lim7p0q?populate[blocks][populate]=media (7 ms) 500