How to change text or image through API

Hello forum,
We are looking for the way to be able to show notifications (both in text and graphical form) through the regions.
Say we defined a region with text information. I want to be able to send API call from 3-rd party software to change the text that was set in the time of creation/update of the layout containing the region.

Can you point me to direction on how to do this?

Thank you in advance,
Yuri.

EDIT: Just in case it wasn’t clear, the guide and the information below are exclusive to 1.8 API, I don’t think you can do any of those in 1.7.

Regarding images/media files, you can have a look at my guide there is a part with media upload, which with additional parameters can replace existing media file. -

Changing text, actually could prove to be somewhat difficult - it’s not documented at all yet.

In order to edit text in a region, you will need widgetId for that text item

Now, you will need to call GET Layout to get playlistId:

Then call GET playlist to get widgedId you need:

Please keep in mind there might be more widgets on your playlist, in my test there is only the text item to make it clearer.

Now that you have your widgetId, you can use PUT playlist/widget/:widgetId call to change the text it will be like this:

Headers:


Body

so you’re changing the text to:
<p><span style=color:#FFFFFF;><span style=font-size:48px;>TEST</span></span></p>

The colour and font size are obviously just an example.

Hope that will help you.

2 Likes

Peter hello.
Thank you for reply.
We are currently on version 1.7.9 which we were able to download from your website for linux.

Should we upgrade to 1.8 and if yes how we can get it?
Or will it work on 1.7.9?

Also do you have dev documentation on how to extend out-of-the box API?

Thank you,
Yuri

The 1.8 branches can be downloaded from GitHub. There is some documentation on the API here: http://xibo.org.uk/manual/en/api.html

The API uses SOAP and WSDL so the API should pretty much self-generate.

1.7 series has incomplete, not well documented API, if you wish to use the API we’d recommend to wait for 1.8 or try 1.8.0-rc1.
1.8 API documentation is linked several times in my guide, http://xibo.org.uk/manual-tempel/en/api.html / http://xibo.org.uk/manual-tempel/api/

1.8.0-rc1 download and upgrade instructions can be found here - http://xibo.org.uk/manual-tempel/en/release_notes_1.8.0-rc1.html