Implementing a kill switch / safe mode feature via API call Xibo 1.8.x

Hi, I am currently working on a project which uses the xibo api to send displays into “safe mode” (i.e. stop showing whatever is currently scheduled and show a priority safe mode layout for a certain duration). My application will be running on multiple different instances/computers therefore I will need a way to keep track of which display is already in safe mode so someone doesn’t accidentally send another safe mode layout request to that display again. I should also be able to put multiple displays into safe mode at once. What will be the best way to go about this? Which api calls will i find useful? Currently I am using the
​/displaygroup​/{displayGroupId}​/display​/assign to assign any selected display to a display group, then adding that display group to a campaign (which contains the safe mode layout) and finally using /schedule to have the campaign run. Is there a better way of doing this? Because since I will be having multiple instances of the app, this method doesn’t solve any of the issues i stated above

ADDITIONAL INFO: I was hoping there was a way to swap the layout of each individual display via api without the use of the displaygroup or campaign. That way I can keep track of each display individually

You probably want to skip the schedule and instead issue a changeLayout command, which will be sent to your display immediately via XMR. It will not only allow you to specify individual displays and durations, but it also has a companion revertToSchedule command which can restore your scheduled layouts.

Thanks for the response. changeLayout call definitely looks like the call I need. I do have one question regarding it. In order to manage and keep track of the state of each individual display, I will still need to create a displayGroup for every display correct? In the call I can only pass in a displayGroupId and not a displayId

EDIT: I tried calling changeLayout two different ways and both failed. First way was with Postman. I passed in the parameters for displayGroupId,layoutId,changeMode, and duration. Received a 404 not found error and an XML body response. Then I tried the second method using python requests. It returned a 204 status but nothing happened to the displays in the display group