Xibo API Question

Hello Community!

i am doing an project for my business. But i am new at Xibo & API. So how can i communicate with Xibo with API? I want to do an automated xibo, where the XML file (With the Information) in an interval -> the information for the layouts… So that the Layout change in an interval of 1 minute approx.

I hope you can help me! Its important

My reply will be regarding 1.8 exclusively - 1.7 has incomplete and not well documented API.

You can have a look here - 1.8 API Introduction
The API documentation is also linked several times in this guide.

That being said, I’m not 100% clear on what do you want to achieve, so if you could please describe it in more details, we might be able to help.

1 Like

Okay I must instal 1.8 beta?
I would like to build a Digital Signage system which changes between 2 foils. Infos and general things like time and weather stand on these 2 foils. I will integrate these infos by RSS Feed; this will be no problem. Then we have the servers monitoring software Nagios. From this i will readout if the servers are okay or not okay (All OK= Picture with green traffic lights; If not OK = red sign with name oft he server ). Now i want send these infos by API to CMS and the CMS will configure the Layout oft he foils with the infos from the Infos oft he Nagios System.
Now my question, can I write something automated so that the CMS read this and change the Layout with the Infos oft he File?
This is on the whole my attempt. Could you help me with that and can i realise that with xibo?
And the biggest question do you understand my request?

The short answer is: “Yes you can do that.”

We dynamically update our content using the API. What you’re going to find is that the current API (which is still fairly new) has some limitations on what types of items you can add/update. You can easily add Library items to a Layout using the API. However, it sounds like your system is similar to ours in that you won’t want to use Library items - you’ll likely want to use Embedded HTML or Webpage items.

There are a number of ways to do what you’re talking about. The first thing to understand is: What’s the format of the output from Nagios? Is it a graphic (JPG/GIF/etc.)? Is it HTML? XML?

For example, we have a system that reads an XML feed provided by one of our web servers. We use the Embedded HTML item type in Xibo. The HTML (with some JavaScript) reads the XML and uses DOM to add data to the page in the Embedded code. By doing this, every time the page loads we get updated data.

To switch between general info and the Nagios feed I’d use a Campaign. One Layout has the general stuff and the other Layout has the Nagios stuff. If you’re not clear - Campaigns are basically an ordered run of specified Layouts. So this will accomplish your goal of switching between the two.

Hope this gives you some direction on this.

2 Likes

You’re right in the sense that these methods aren’t documented yet (because we aren’t sure the best way to do that and don’t want to put something in writing that we might have to later change). However, if you’re happy looking at the code, you can access every transaction from the API that you can from the WEB UI.

Otherwise - great answer! thanks

2 Likes

Okay so do i understand it right that i can write a script in the API of xibo that takes the Information for the Layout from a file and i can add to the script that it should repeat that every 30 seconds aprox. ? So that it takes every 30 seconds the Information from the file.

Yes you can do that - you would need to create your layout in the CMS, with a region. Get the ID’s of those items using the layoutSearch API method and then use those ID’s for add/edit on the widgets you require.

We will be updating the API doc with the methods for each widget in the next week.

2 Likes

Okay that sounds great! I hope this will get real in the early of next wee. :slight_smile:

Could you please link me the API doc with the methods?

The documentation for each module add/edit/delete is complete now, I believe Dan will build the swagger.json and update the API documentation when we release rc3.

2 Likes

api/display is not working with postman