The Quick Data API can be used for making changes to data in objects without the complexity of managing JSON objects. The purpose of this API is to automate adding data that is used in stack item evaluation.
Data can be sent as a URL encoded form post or as query parameters in the URL.
Quickly updating data for selectively displaying items
For example, to only display an advert for a coat when it is cold and wet, an item may be constructed with the following condition:
temp < 15 && weather == "rain"
To populate the required data to display/hide the item, the following Quick Data API request could be made by an external system that monitors the weather:
/api/screen-data/ABCEF1234567?temp=10&weather=rain
This sets the data named temp
to the value 10 and the data named weather
to the value rain
in the screen with the ID ABCEF1234567
.
This would result in the item being able to display.
Quickly changing screen configuration
The Quick Data API can be used to make data changes that are not part of stack item evaluation. For example, to quickly change the sequence being displayed or to update scrolling text on a screen.
Changes take effect instantly (UDP communications with server required).
/api/screen-data/ABCEF1234567?sequenceId=1234567ABCDEF
Display the sequence with ID 1234567ABCDEF
on the screen with the ID ABCEF1234567
.
/api/screen-data/ABCEF1234567?scrollingText=HelloWorld!
Display the scrolling text HelloWorld!
on the screen with the ID ABCEF1234567
.
Removing data
To remove data from an object, provide the name and equals with no value.
/api/screen-data/ABCEF1234567?scrollingText=
Remove the data named scrollingText
from the screen with the ID ABCEF1234567
.
Updating multiple screens in a group
To modify data in a group of screens in a single request.
/api/group-screen-data/london.screens?overrideTimeZone=Europe/London
Overrides the timezone of all screens in the group named london.screens
with overrideTimeZone=Europe/London
.
The group-screen-data
endpoint is for updating data for multiple screens and does not return data. The response body will be OK
if successful.
Quickly changing other data
The Quick Data API can also be used to quickly update data in other objects.
Sequence data
/api/sequence-data/1234567ABCEF?offer=1
Sets the data named offer
to the value 1
in the sequence with the ID 1234567ABCEF
.
User data
/api/user-data/1A2B3C4D5E6F7?label=Joe%20Blogs
Set the data named label
to the value Joe Bloggs
in the user with the ID 1A2B3C4D5E6F7.
Library Item data
/api/libraryitem-data/1A2B3C4D5E6F7?label=Promotion
Sets the data named label
to the value Promotion
in the library item with the ID 1A2B3C4D5E6F7.
Java Code Examples
Some examples demonstrating how to use the quick data API in a Java application:
Comments
0 comments
Please sign in to leave a comment.