Introduction
The Bulk Data Update API is for adding, removing and modifying data in multiple items with a single API call. This can be useful for updating many screens with the same data quickly and efficiently.
This API can also be used to update multiple users, groups, sequences and library items. (contact us)
API Request Structure
The Bulk Data Update API expects a JSON payload to be sent by a HTTP POST method to this address:
/api/bulk-data-update
The request body must have a content type of application/json and consist of a single JSON object with 3 fields; type, ids and data.
The type field may be set to screen, sequence or libraryitem. The default is screen if not set.
The ids field must be populated with an array of IDs referring to items that will be updated by the API call. Please note that all items must be accessible to the authenticated user. If one or more ids is inaccessible or does not exist the request will fail and no items will be updated. See below for error responses.
The data field must be another object containing the data changes to be made to all items referenced by the IDs. Data fields that do not already exist in the item data will be created and existing fields updated. To remove a field, the value can be set to an empty string or null.
Example Requests
{
type: "screen",
ids: [ "1234567890AB", "1234567890AC", "1234567890AD" ],
data: {
scrollingText: "Store closing at 5pm"
}
}
Displays the scrolling text "Store closing at 5pm" on the screens 1234567890AB, 1234567890AC and 1234567890AD.
{
type: "screen",
ids: [ "1234567890AB", "1234567890AC", 1234567890AD" ],
data: {
scrollingText: ""
}
}
Removes scrolling text on the screens 1234567890AB, 1234567890AC and 1234567890AD.
{
type: "libraryitem",
ids: [ "1234567890ABCD", "1234567890ABCE" ],
data: {
durationMillis: "20000"
}
}
Sets the duration of library items 1234567890ABCD, 1234567890ABCE to be 20 seconds. Note that this data will be used as defaults when the item is added to sequences in the future. It does not update sequences that the item has already been added to.
Example Responses
Success
HTTP Response Code 200
{
code: 200,
info: "Data updated"
}
Fail
HTTP Response Code 4XX
{
code: 403,
info: "Permission to update one or more items denied"
}
An additional message and exception may also be provided to help debug problems.
Comments
0 comments
Article is closed for comments.