We are using a plugin which adds a downloads block to the page. The data returned only includes the media id and we need the media information to included.
We’re using this store-api endpoint:
/store-api/cms/{PAGE__UUID}
{
"blocks": [
{
"versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
"type": "na15-downloadcenter",
"slots": [
{
"versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
"translated": {
"config": {
"category": {
"value": "018baf2b4117742d9d52e3f1563d2a32",
"source": "static"
}
},
"customFields": {}
},
"createdAt": "2023-11-22T13:32:22.129+00:00",
"updatedAt": "2023-12-04T10:58:37.719+00:00",
"type": "na15-downloadcenter",
"slot": "content",
"block": null,
"blockId": "018bf73b3bc970938bf24824406cd089",
"config": {
"category": {
"value": "018baf2b4117742d9d52e3f1563d2a32",
"source": "static"
}
},
"fieldConfig": [
{
"name": "category",
"source": "static",
"value": "018baf2b4117742d9d52e3f1563d2a32",
"apiAlias": "cms_data_resolver_field_config"
}
],
"translations": null,
"data": {
"_uniqueIdentifier": "018c399b9c2071ba8f98cfa10d64a935",
"translated": [],
"files": {
"018baf2b825f7b6b97931ea1cb41d409": {
"translated": {
"title": "Test download",
"mediaId": "018badc8d503753eb48ad6704da76b0f"
},
"createdAt": "2023-11-08T13:43:35.725+00:00",
"updatedAt": "2023-12-04T14:06:20.317+00:00",
"category": {
"translated": {
"title": "Test category"
},
"createdAt": "2023-11-08T13:42:14.981+00:00",
"updatedAt": null,
"id": "018baf2b4117742d9d52e3f1563d2a32",
"title": null,
"apiAlias": "na15_file_category"
},
"priority": null,
"id": "018baf2b825f7b6b97931ea1cb41d409",
"title": null,
"mediaId": null,
"apiAlias": "na15_file"
}
},
},
"apiAlias": "cms_slot"
}
],
}
]
}
For the product endpoint I ended up using this in order to include media entity data:
store-api/product/{PRODUCT__UUID}
{
"associations": {
"na15_file": {
"associations": {
"translations": {
"associations": {
"media": {}
}
}
}
}
}
}
Is something like this possible for the CMS endpoint as well? Or is there a way using the store-api we can retrieve media information by id?