Skip to content
CtrlK

Examples

The examples use curl and the variable $API_TOKEN. The base URL is https://cloud.viewneo.com/api/public/v1.

Files don’t go through the API itself but directly into storage – via a pre-signed address. This makes even large videos fast.

Terminal window
# 1. Start the upload
curl https://cloud.viewneo.com/api/public/v1/media/uploads -H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"filename":"speisekarte.jpg","mimeType":"image/jpeg","fileSize":'"$(wc -c < speisekarte.jpg)"'}'
# 2. Send the file to upload.url from the response
curl -X PUT "$UPLOAD_URL" -H "Content-Type: image/jpeg" --data-binary @speisekarte.jpg
# 3. Complete it, with the MD5 checksum
curl https://cloud.viewneo.com/api/public/v1/media/uploads/$MEDIA_ID/complete -H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"md5":"'"$(openssl md5 -r speisekarte.jpg | cut -d' ' -f1)"'"}'

Large files are uploaded as multipart: the response from step 1 then states the part size; you get the addresses of the parts with POST /media/uploads/{id}/parts.

After that, the content is ready. Videos are prepared for playback in the background. Some formats are converted and in the process replace the uploaded content: TIFF, BMP and HEIC become JPEG (or PNG with transparency), documents such as PDF or PowerPoint become one image per page in a new folder. You find the new IDs via GET /media?folderId=….

Terminal window
# add the content to a playlist – on weekdays at lunchtime
curl https://cloud.viewneo.com/api/public/v1/playlists/$PLAYLIST_ID/entries \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" \
-d '{"type":"media","mediaId":"'"$MEDIA_ID"'","durationSeconds":15,
"schedule":{"rule":"scheduled","weekdays":["mon","tue","wed","thu","fri"],"startTime":"11:30","endTime":"14:30"}}'
# assign the playlist to a device (a group works the same way via /device-groups)
curl -X PATCH https://cloud.viewneo.com/api/public/v1/devices/$DEVICE_ID \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" \
-d '{"playlistId":"'"$PLAYLIST_ID"'"}'

Design a Template with placeholders once in the Designer. Your system creates content from it and updates it whenever the data changes:

Terminal window
# which placeholders does the template have?
curl https://cloud.viewneo.com/api/public/v1/templates/$TEMPLATE_ID -H "Authorization: Bearer $API_TOKEN"
# create content from it – add its ID to a playlist like any media item
curl https://cloud.viewneo.com/api/public/v1/templates/$TEMPLATE_ID/contents \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" \
-d '{"name":"Mittagstisch","values":{"gericht":"Labskaus","preis":"12,50 €"}}'
# change the values the next day – the devices update themselves
curl -X PATCH https://cloud.viewneo.com/api/public/v1/template-contents/$CONTENT_ID \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" \
-d '{"values":{"gericht":"Fischfrikadelle","preis":"11,90 €"}}'

The names of the placeholders (here gericht and preis) come from your Template.

Send the complete content in one call. Entries you send with their id are kept, new ones are created, and all others are removed:

Terminal window
curl -X PUT https://cloud.viewneo.com/api/public/v1/playlists/$PLAYLIST_ID/entries \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" \
-d '{"entries":[{"type":"media","mediaId":"'"$ANGEBOT_1"'"},{"type":"media","mediaId":"'"$ANGEBOT_2"'"}]}'

Start the player; it shows a six-character activation code. Activate it into a device group – every device belongs to one – and it immediately plays the group’s content:

Terminal window
curl https://cloud.viewneo.com/api/public/v1/devices/activate \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" \
-d '{"activationCode":"AB3XZ7","name":"Lobby Empfang","groupId":"'"$GROUP_ID"'"}'

Every player needs a license; licenses are never added automatically. Without a free license, the API responds with 409 LICENSE_LIMIT_REACHED.

Terminal window
curl "https://cloud.viewneo.com/api/public/v1/devices?limit=100" -H "Authorization: Bearer $API_TOKEN" \
| jq '.data[] | select(.online == false) | {name, lastSeenAt}'
Terminal window
curl "https://cloud.viewneo.com/api/public/v1/reports/device-log/$DEVICE_ID?filter=playouts&from=2026-10-06T00:00:00Z&to=2026-10-07T00:00:00Z&limit=200" \
-H "Authorization: Bearer $API_TOKEN"

Repeat the call with &cursor=<nextCursor> until nextCursor is null. For an entire month of a piece of content in one go, there is the CSV export GET /reports/media/{id}/playout-details/export.