I'm trying to create a new object via the pimcore rest api.
The object that I'm trying to create contains blocks. The object is created but the content, that should appear in the block is not created.
{
"className": "TrainingCourseMaterial",
"parentId": -1,
"key": "Slides",
"published": true,
"data": {
"elements": [{
"type": "block",
"value": [{
"contentlanguage": "de",
"slides": [{
"image__image": 1859,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1860,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1861,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1862,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1863,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1864,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1865,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1866,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1867,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1868,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
},
{
"image__image": 1869,
"image__hotspots": {
"hotspots": [],
"marker": [],
"crop": []
}
}
]
}
],
"name": "SlidesBlock",
"language": null
}]
}
}
Not sure if this is even possible. Last resort would be to use the admin api.
It is possible as documented: https://pimcore.com/docs/platform/Pimcore/Objects/Object_Classes/Data_Types/Blocks/ https://pimcore.com/docs/platform/Pimcore/Objects/Object_Classes/Data_Types/Image_Types/#get-the-cropped-image
Something like: