Update:
Hi Dan,
I found the error. It was a missing declaration of the regions attribute in the Model/Layout class.
When I edit the definition of the Layout class in the swagger.json file and regenerate the code, the created Layout class does have the region as attributes listed.
When I do my call using the API:
$layouts = $api->layoutSearch(null, null, null, null, null, null, null, null, null, null, array(“regions”), null);
The resulting layout instance holds the regions:
{
“layoutId”: 1,
“ownerId”: 1,
“campaignId”: 1,
“publishedStatusId”: 2,
“publishedStatus”: “Draft”,
“schemaVersion”: 3,
“layout”: “Default Layout”,
“description”: “”,
“backgroundColor”: “#000000”,
“createdDt”: “2020-04-29 10:17:20”,
“modifiedDt”: “2020-05-07 08:05:52”,
“status”: 1,
“retired”: 0,
“backgroundzIndex”: 0,
“width”: 1920,
“height”: 1080,
“regions”: [
{
“regionId”: 1,
“layoutId”: 1,
“ownerId”: 1,
“name”: “1”,
“width”: 1920,
“height”: 936,
“top”: 0,
“left”: 0,
“zIndex”: 0,
“regionOptions”: ,
“permissions”: ,
“duration”: 15
},
{
“regionId”: 2,
“layoutId”: 1,
“ownerId”: 1,
“name”: “2”,
“width”: 432,
“height”: 129,
“top”: 941,
“left”: 1470,
“zIndex”: 0,
“regionOptions”: ,
“permissions”: ,
“duration”: 10
}
],
“duration”: 15,
“enableStat”: 0,
“autoApplyTransitions”: 0
}
This is the change I did in the swagger.json file (around line 11910):
“regions”: {
“description”: “An array of regions assigned to this Layout”,
“type”: “array”,
"items": {
"$ref": "#/definitions/Region"
}
},
So you might want to update the swagger.json file at https://xibo.org.uk/manual/swagger.json, too.
Thinking about what else is meant to be embeddable using the layoutSearch API I presume that the other options are missing in the Layout swagger definition, too (e. g. playlists).
Shall I raise an issue in github, or do you want to take care of this?
Cheers,
Trallala 