Lockdown procedure

Hello!

We have several levels of our lockdown procedure and I was wondering if there was a quick way to schedule specific layouts as a priority? With as few clicks as possible obviously. I can see I could schedule a layout in a Group, but that would require setting the dayparting, the layout, priority etc.

What I am hoping for is the ability to press 1 or 2 buttons to send out this specific layout to all displays until it is manually turned off. Is something like this possible\configurable? Or perhaps a future update?

Many thanks!
Ben

You could use API (assuming you’re using 1.8 CMS), and call the changeLayout (with long duration) or create a new scheduled event with either always daypart or long toDt.

Then either manually or also via API remove the event from the schedule.

It would be best to have a layout that should be displayed in this case ready and a display group with all your displays as members, so then you could actually do that action in 1-2 clicks if needed.

In short:
Prepare the layout,
Prepare the display group,
Prepare suitable API call (you could even use something like Postman to send it if you don’t want to write a script/ api application for that).

Execute the API call when needed.

Thanks for that Peter.

Just having a look a the changeLayout you’ve mentioned. How do I get that as a script? I’ve never used Postman before so I want to try a script before investing time in Postman.

If you are able to provide some basics of what the API call would look like, I can modify it for our stuff.

Many thanks,
Ben

Our API Introduction can help you - 1.8 API Introduction

It is actually based on the Postman, and you can use whichever language you want to write a script that will use this call (just need to remember to get the access_token before you call it). https://xibo.org.uk/manual/en/cms_api.html

Cheers. I shall give it a go!

Ben

Okay, I’m getting this error:

Is it because I’m not on the CMS server trying to request the token?

It should be called just as form-data ie as in my guide and hopefully as in the collection you downloaded (if it is wrong there, please do let me know).

What do you have in the url in the environment please?

Also which CMS version you have and is it docker or manual installation?

Think that was my fault, I used the netbios name, not IP. I’ve changed it to the IP address in the environment and I’m now getting this error:

CMS version is 1.8.7 and I think it was a manual install (my manager did the backend stuff)

Dont worry, got it. For some reason the environment set the clientId value to {{clientId}}, instead of the string of text it should be.

Thanks,
Ben

1 Like

Hi Peter,

Can I just check these API calls will work as intended?

Call to display lockdown layout:

Call to display normal screens:

You may want to provide the duration as well, unless the layout duration is exactly how you want it - basically if you don’t provide the duration parameter in this call, then the layout to which you want to change there will remain on the screen for the layout duration.

As you have it now, when you call the first one, it will change for the layoutId 56, for the full duration of this layout, then go back to “normal” scheduled content on the player.

Ok. I’ve set the Lockdown layout duration, within the CMS, to 3600 seconds so when I run the call, it will display for 1 hour then revert back to the previous layout?

As for the second call, provided it all works with the first one and the layout is not needed for an hour, will it revert back to the normal content when run?

(I work in a school and it’s a little tricky to test these things during the day without freaking people out!)

Thanks,
Ben

Yes.

Yes, assuming that layout id 20 is the “normal” content, then yes it would show that for the layout duration then reload and go back to the schedule (which probably is the same layout).

However if I may, I’d suggest you to simply use this call instead - Swagger UI
ie
image
Where in my example the the 23 is the displayGroupId on which I want to run it, in your example it would be 18 I believe.

As the name suggest, this call will revert the player to show the scheduled content and remove the layout imposed with changeLayout call.

Oh ok, that looks like it could be better. Do I enter anything into the body or do I just change my group ID in the URL to 18 and it should revert back?

Correct, nothing in the body, this call takes only one parameter displayGroupId and it is in the path.

You do of course want to pass the Authorization header with Bearer {{access_token}} as with any other call.

Yep, I’ve put that in. I’m going to test it later today and see what we get. I’ll let you know if I get any issues.

Thanks!
Ben

Ok, I’m getting this error but I’m not sure why.

That would be because your access_token for the Postman application has expired, you’d need to get a new one and then use other calls - the token is active for an hour after you request it.

Yeah I tried that after posting that, it did work but I think I’ll need to do some more trialling on it, some TV’s picked it up straight away and some didn’t at all, might be how things are set up here.

Also, is there a way to make the tokens not expire? Or is that a built in function?

Thanks,
Ben

Is there a way to have the token not expire? Or another way of generating the token that wouldn’t need me to generate one before making a call?

Thanks.