So the process I have is creating the layout, getting the draft layout id, add a region to that layout, get that new regions playlist id, add content to that playlist.
When I then try to publish I get an error on an empty region.
I tried just editing the region that there on layout creation but it doesn’t allow it because its “not a draft”
and when I get the draft layout it doesn’t provide me the region details. (I assumed there were none)
I assume there must be an easier way to do this?
Also now that I have most of the process working I have ~12 Callouts chained together which seems like A LOT (Is there a way I can condense some of these down?)
Create a playlist, Enable stats, Add a subplaylist widget, Add content, Create layout, Enable stats, Get draft layout, Add region, Add subplaylist widget, Add content, Create schedule.
Remove empty region, Publish layout