Layout ID seems to change after updates

I am using Node-Red to give Bar Managers ability to change the Xibo Layouts used depending on what is required.
Everything works perfect but what I’m finding is that when I do an update to the Xibo CMS version, for some reason the layout ID of some of the designs is changing. As an example in CMS v3.1.2 the layout ID might be 239 but after an update to CMS 3.1.3 that exact same layout now has an ID of 246.
I’ve done no other changes other than to update the CMS version.

Because the layout ID number is hard coded in Node-red it then fails to display the correct layout.

Is this something in the CMS update process that is causing this.

The layout ID shouldn’t change across an upgrade, but it will change every time that layout is checked out and published.

If you want a fixed ID to reference that layout, then use the campaignId for that layout which you can get from the layout object, or you can find shown in recent CMS versions on the Layouts page under the ID column. LayoutId which is what you’re using is shown in its own column (Layout ID) which you have to specifically enable to see.

Ok got it. Now you mention it I did checkout the layout designs of a few items.
Is there any other way to change the layout of a Display. I was told by support (#039279) to use the LayoutID but didn’t know it’s number always changed so that’s kind of useless in our situation.

At the moment I’m using [​/displaygroup​/{displayGroupId}​/layout​/assign] which appears to be only able to use the LayoutID number.
Would using a call to /displaygroup/{displayGroupId}/action/changeLayout be better, as it appears that it might be able to use campaignId instead which you mention won’t change.

Thanks
Aleka

You use the campaignId to lookup the layoutId and then use that for the other calls.