Démarrage rapide Broadsign Air
Ce démarrage rapide fournit une introduction de base à Broadsign Air. En suivant ces étapes, vous pourrez ajouter le « lecteur » qui représente votre propre lecteur et générer une liste de lecture.
Note : Tous les horodatages inclus dans les listes de lecture utiliseront le fuseau horaire configuré dans Broadsign Control Administrator pour les unités d'affichage associées. Il est essentiel de s'assurer que le bon fuseau horaire est configuré. Si aucun fuseau horaire n'est configuré, le serveur utilisera par défaut GMT+0 pour la date de début et de fin des campagnes, des horaires et des heures d'ouverture sous cette unité d'affichage. Différentes unités d'affichage peuvent être configurées sur des fuseaux horaires différents si nécessaire. Pour plus d'informations, consultez Timezone.
Note : Pour plus d'informations sur la configuration de Broadsign Air, voir Configurer Broadsign Air.
Pour commencer avec Broadsign Air :
- Demander que Broadsign Air soit activé sur votre domaine. Voir Prérequis.
- Une fois activé, créez un utilisateur API dans Broadsign Control Administrator et générez un jeton d'API REST pour lui dans Broadsign Control Administrator. Voir Ajouter un utilisateur dans Broadsign Control Administrator.
- Planifiez du contenu (campagnes, copies publicitaires, etc.) sur vos unités d'affichage. Voir Ajouter des campagnes.
- Ajoutez un enregistrement de lecteur à l'aide d'un identifiant personnalisé dans cette unité d'affichage. Voir Ajouter un lecteur dans Broadsign Control Administrator.
- Si vous avez besoin de lire différents contenus de manière synchronisée sur plusieurs lecteurs à l'aide du point de terminaison generate v1, configurez un groupe d'unités d'affichage. Voir Lecteurs synchronisés.
- Générez une liste de lecture en appelant cette API avec une commande curl (voir Exemple de requête utilisant Curl).
- Si vous utilisez generate v1 :
- Si vous utilisez generate v2 :
- Si vous utilisez generate_long :
- Le cas échéant, confirmez la preuve de diffusion (PoP) à l'aide du jeton API REST (voir confirm_playback) :
Note : Une fois le lecteur enregistré, vous devez l'activer (le promouvoir) avec une demande de génération de playlist en utilisant les informations du lecteur.
Il existe deux versions du point de terminaison generate. La réponse sera différente selon la version utilisée.
curl -X POST \
https://air.broadsign.com/playlist/v1/generate \
-H 'Authorization: Bearer cbdbc369a063de6c0f458557f1456602' \
-d '{
"player_identifier": "abcd1234",
"screen_identifier": "1",
"duration": "3600s"
}'
Le serveur Broadsign Air renvoie des éléments et du contenu similaires à ce qui suit suivants (voir Réponse).
{
"items": [
{
"startTime": "2019-06-14T14:17:26.456Z",
"duration": "5s",
"token": "CgphbGV4YW5kcmVjEgNVVEMaDAj22I7oBRCAhLjZASICCAUoAToDCNMBQgMIlRtKAwiSG2IDVVUwcgMI4BE=",
"contentIndex": 0,
"campaignIndex": 0,
"frameIndex": 0,
"geometryIndex": 0
},
{
"duration": "5s",
"token": "CgphbGV4YW5kcmVjEgNVVEMaDAj72I7oBRCAhLjZASICCAUoAToDCNQBQgMInhtKAwiSG2IDVVUwcgMI4BE=",
"contentIndex": 1,
"campaignIndex": 1,
"frameIndex": 0,
"geometryIndex": 0
},
{
"duration": "5s",
"token": "CgphbGV4YW5kcmVjEgNVVEMaDAio2Y7oBRCAhLjZASICCAUoAToDCNMBQgMIlRtKAwiSG2IDVVUwcgMI4BE=",
"contentIndex": 2,
"campaignIndex": 2,
"frameIndex": 0,
"geometryIndex": 0
},
],
"contents": [
{
"name": "Content-0",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/content/9e6b1fb31f50.jpg",
"size": "187435",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "211"
},
{
"name": "Content-1",
"mimeType": "mp4",
"uri": "https://my-storage-url.com/content/9e6b1fb31f51.mp4",
"size": "97434227",
"hash": {
"type": "CRC32",
"payload": "ODI0MmZjMjg="
},
"adCopyId": "212"
},
{
"name": "Content-2",
"mimeType": "x-html-package",
"uri": "https://my-storage-url.com/content/9e6b1fb31f52.x-html-package",
"size": "97227",
"hash": {
"type": "CRC32",
"payload": "ODI0MmZjMjg="
},
"adCopyId": "213",
"dataSynchronizations": [
{
"from": "https://weather.com/data.json",
"to": "sync_data/weather_data.json",
"behavior": "FILE_SYNCHRONIZATION",
"expiry": "480s",
"refreshPeriod": "60s",
"timeoutPeriod": "120s"
}
],
"htmlPackageParameters": {
"mainHtmlFilePath": "assets/index.html"
}
},
{
"name": "FillerContent",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/content/9e6b1fb31f53.jpg",
"size": "244768",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "214"
},
],
"identification": {
"playerId": "123",
"displayUnitId": "124",
"displayUnitLatlong": {
"latitude": 45.5164,
"longitude": -73.5548
},
"displayUnitAddress": "1100 Robert-Bourassa Montreal"
},
"campaigns": [
{
"campaignId": "321"
},
{
"campaignId": "322"
},
{
"campaignId": "323"
}
],
"frames": [
{
"frameId": "411",
"fillerIndices": [0],
"name": "center",
"criteriaIndices": [0]
}
],
"geometries": [
{
"width": 1920,
"height": 1080,
"fullscreen": true
}
],
"fillers": [
{
"contentIndex": 3,
"duration": "30s"
}
],
"criterias": [
{
"criteriaId": 511,
"name": "CriteriaForCenterFrame"
}
],
"dataSynchronizations": [
{
"from": "https://source.test.com/data.txt",
"to": "common/data.txt",
"behavior": "FILE_SYNCHRONIZATION",
"expiry": "60s",
"refreshPeriod": "6000s",
"timeoutPeriod": "120s"
}
]
}
Le point de terminaison generate v2 prend en charge les listes de lecture ayant plusieurs cadres. Voir Prise en charge de plusieurs cadres (Broadsign Air) pour plus de détails.
curl -X POST \
https://air.broadsign.com/playlist/v2/generate \
-H 'Authorization: Bearer cbdbc369a063de6c0f458557f1456602' \
-d '{
"player_identifier": "abcd1234",
"screen_identifier": "1",
"duration": "3600s"
}'
Le serveur Broadsign Air renvoie des éléments et du contenu similaires à ce qui suit suivants (voir Réponse).
{
"playlists": [
{
"items": [
{
"startTime": "2022-08-29T17:37:56.111Z",
"duration": "3600s",
"token": "CgphbGV4YW5kcmVjEgNVVEMaDAj22I7oBRCAhLjZASICCAUoAToDCNMBQgMIlRtKAwiSG2IDVVUwcgMI4BE=",
"geometryIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM+q3tWuMCDAzyQoATjCmAFA19gBSNPYAXDSmAE=",
"contentIndex": 1,
"geometryIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI/6gtauMCDAzyQoATjaAUDX2AFI09gBcNKYAQ==",
"contentIndex": 2,
"geometryIndex": 1,
"frameIndex": 2
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/Jp9auMCDAzyQoATitAkDX2AFI09gBcNKYAQ==",
"contentIndex": 3,
"geometryIndex": 1,
"frameIndex": 2
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+ZzNauMCDAzyQoATjblwFA19gBSNPYAXDSmAE=",
"geometryIndex": 1,
"frameIndex": 4
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/o8NauMCDAzyQoATjCmAFA19gBSNPYAXDSmAE=",
"contentIndex": 1,
"geometryIndex": 1,
"frameIndex": 4
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+4ldeuMCDAzyQoATjaAUDX2AFI09gBcNKYAQ==",
"contentIndex": 2,
"geometryIndex": 1,
"frameIndex": 6
}
]
},
{
"items": [
{
"startTime": "2022-08-29T17:37:56.111Z",
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI/budWuMCDAzyQoATjblwFA19gBSfasdfAXDSmAE=",
"frameIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM+budWuMCDAzyQoATjblwFA19gBSfasdfAXDSmAE=",
"contentIndex": 1,
"frameIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI/6gtauMCDAzyQoATjaAUfdsaaAFI09gBcNKYAQ==",
"contentIndex": 2,
"frameIndex": 3
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/Jp9auMCDAzyQoATjfusDX2AFI09gBcNKYAQ==",
"contentIndex": 3,
"frameIndex": 3
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+ZzNauMCDAzyQoATjblwFA19gBSNPYAXDSmAE=",
"frameIndex": 5
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/o8NauMCDAzyQoATjCmAFA19gBSNPYAXDSmAE=",
"contentIndex": 1,
"frameIndex": 5
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+4ldeuMCDAzyQoATjaAUDX2AFI09gBcNKYAQ==",
"contentIndex": 2,
"frameIndex": 7
}
]
},
],
"contents": [
{
"name": "Content-0",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "187435",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "211"
},
{
"name": "Content-1",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "97227",
"hash": {
"type": "CRC32",
"payload": "ODI0MmZjMjg="
},
"adCopyId": "212"
},
{
"name": "Content-2",
"mimeType": "x-html-package",
"uri": ""https://my-storage-url.com/content/9e6b1fb31f52.x-html-package"",
"size": "97227",
"hash": {
"type": "CRC32",
"payload": "ODI0MmZjMjg="
},
"adCopyId": "2122",
"dataSynchronizations": [
{
"from": "https://weather.com/data.json",
"to": "sync_data/weather_data.json",
"behavior": "FILE_SYNCHRONIZATION",
"expiry": "480s",
"refreshPeriod": "60s",
"timeoutPeriod": "120s"
}
]
"htmlPackageParameters": {
"mainHtmlFilePath": "assets/index.html"
}
},
{
"name": "FillerContent",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "244768",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "2222"
},
{
"name": "FillerContent-LeftScreen",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "244768",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "2226"
}
],
"identification": {
"playerId": "2272",
"displayUnitId": "3472"
"displayUnitLatlong": {
"latitude": 45.5164,
"longitude": -73.5548
},
"displayUnitAddress": "1100 Robert-Bourassa Montreal"
},
"campaigns": [
{
"campaignId": "19889482"
},
{
"campaignId": "14889444"
},
{
"campaignId": "99932"
}
],
"frames": [
{
"frameId": "19889456",
"fillerIndices": [0],
"name": "LeftFrame-DayPart1",
"criteriaIndices": [0]
},
{
"frameId": "19889901",
"fillerIndices": [1],
"name": "RightFrame-DayPart1",
"criteriaIndices": [1]
},
{
"frameId": "1489431",
"fillerIndices": [0],
"name": "LeftFrame-DayPart2",
"criteriaIndices": [0]
},
{
"frameId": "18890012",
"fillerIndices": [1],
"name": "RightFrame-DayPart2",
"criteriaIndices": [1]
},
{
"frameId": "12437980",
"fillerIndices": [0],
"name": "LeftFrame-DayPart3",
"criteriaIndices": [2]
},
{
"frameId": "132795",
"fillerIndices": [1],
"name": "RightFrame-DayPart3",
"criteriaIndices": [2]
},
{
"frameId": "89001",
"fillerIndices": [0,1],
"name": "LeftFrame-DayPart4",
"criteriaIndices": [0]
},
{
"frameId": "1988457",
"fillerIndices": [0,1],
"name": "RightFrame-DayPart4",
"criteriaIndices": [1]
}
],
"geometries": [
{
"width": 1920,
"height": 1080,
"fullscreen": true
}
]
"fillers": [
{
"contentIndex": 3,
"duration": "30s"
}
},
{
"contentIndex": 4,
"duration": "60s"
}
}
],
"criterias": [
{
"criteriaId": 36890241,
"name": "CriteriaForLeftFrame"
},
{
"criteriaId": 36890456,
"name": "CriteriaForRightFrame"
},
{
"criteriaId": 36890625,
"name": "AnotherCriteria"
}
]
"dataSynchronizations": [
{
"from": "https://source.test.com/data.txt",
"to": "common/data.txt",
"behavior": "FILE_SYNCHRONIZATION",
"expiry": "0s",
"refreshPeriod": "6000s",
"timeoutPeriod": "120s"
}
]
}
Le point de terminaison generate_long permet aux lecteurs de récupérer des listes de lecture hors ligne disponibles jusqu'à 14 jours.
curl -X POST \
https://air.broadsign.com/playlist/v2/generate_long \
-H 'Authorization: Bearer cbdbc369a063de6c0f458557f1456602' \
-d '{
"player_identifier": "abcd1234",
"screen_identifier": "1",
"date": {
"year": 2022,
"month": 8,
"day": 29
}
}'
Le serveur Broadsign Air renvoie des éléments et du contenu similaires à ce qui suit suivants (voir Réponse).
{
"playlists": [
{
"items": [
{
"startTime": "2022-08-29T17:37:56.111Z",
"duration": "3600s",
"token": "CgphbGV4YW5kcmVjEgNVVEMaDAj22I7oBRCAhLjZASICCAUoAToDCNMBQgMIlRtKAwiSG2IDVVUwcgMI4BE=",
"geometryIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM+q3tWuMCDAzyQoATjCmAFA19gBSNPYAXDSmAE=",
"contentIndex": 1,
"geometryIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI/6gtauMCDAzyQoATjaAUDX2AFI09gBcNKYAQ==",
"contentIndex": 2,
"geometryIndex": 1,
"frameIndex": 2
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/Jp9auMCDAzyQoATitAkDX2AFI09gBcNKYAQ==",
"contentIndex": 3,
"geometryIndex": 1,
"frameIndex": 2
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+ZzNauMCDAzyQoATjblwFA19gBSNPYAXDSmAE=",
"geometryIndex": 1,
"frameIndex": 4
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/o8NauMCDAzyQoATjCmAFA19gBSNPYAXDSmAE=",
"contentIndex": 1,
"geometryIndex": 1,
"frameIndex": 4
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+4ldeuMCDAzyQoATjaAUDX2AFI09gBcNKYAQ==",
"contentIndex": 2,
"geometryIndex": 1,
"frameIndex": 6
}
]
},
{
"items": [
{
"startTime": "2022-08-29T17:37:56.111Z",
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI/budWuMCDAzyQoATjblwFA19gBSfasdfAXDSmAE=",
"frameIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM+budWuMCDAzyQoATjblwFA19gBSfasdfAXDSmAE=",
"contentIndex": 1,
"frameIndex": 1
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI/6gtauMCDAzyQoATjaAUfdsaaAFI09gBcNKYAQ==",
"contentIndex": 2,
"frameIndex": 3
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/Jp9auMCDAzyQoATjfusDX2AFI09gBcNKYAQ==",
"contentIndex": 3,
"frameIndex": 3
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+ZzNauMCDAzyQoATjblwFA19gBSNPYAXDSmAE=",
"frameIndex": 5
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGM/o8NauMCDAzyQoATjCmAFA19gBSNPYAXDSmAE=",
"contentIndex": 1,
"frameIndex": 5
},
{
"duration": "3600s",
"token": "CgthaXJfcGxheWVyMhIDVVRDGI+4ldeuMCDAzyQoATjaAUDX2AFI09gBcNKYAQ==",
"contentIndex": 2,
"frameIndex": 7
}
]
},
],
"contents": [
{
"name": "Content-0",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "187435",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "211"
},
{
"name": "Content-1",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "97227",
"hash": {
"type": "CRC32",
"payload": "ODI0MmZjMjg="
},
"adCopyId": "212"
},
{
"name": "Content-2",
"mimeType": "x-html-package",
"uri": ""https://my-storage-url.com/content/9e6b1fb31f52.x-html-package"",
"size": "97227",
"hash": {
"type": "CRC32",
"payload": "ODI0MmZjMjg="
},
"adCopyId": "2122",
"dataSynchronizations": [
{
"from": "https://weather.com/data.json",
"to": "sync_data/weather_data.json",
"behavior": "FILE_SYNCHRONIZATION",
"expiry": "480s",
"refreshPeriod": "60s",
"timeoutPeriod": "120s"
}
]
"htmlPackageParameters": {
"mainHtmlFilePath": "assets/index.html"
}
},
{
"name": "FillerContent",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "244768",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "2222"
},
{
"name": "FillerContent-LeftScreen",
"mimeType": "jpg",
"uri": "https://my-storage-url.com/11045825-19889464/8e649eb2-4e0a-4727-8d8c-9e6b1fb31f50.jpg",
"size": "244768",
"hash": {
"type": "CRC32",
"payload": "ODc1ZTlmYg=="
},
"adCopyId": "2226"
}
],
"identification": {
"playerId": "2272",
"displayUnitId": "3472"
"displayUnitLatlong": {
"latitude": 45.5164,
"longitude": -73.5548
},
"displayUnitAddress": "1100 Robert-Bourassa Montreal"
},
"campaigns": [
{
"campaignId": "19889482"
},
{
"campaignId": "14889444"
},
{
"campaignId": "99932"
}
],
"frames": [
{
"frameId": "19889456",
"fillerIndices": [0],
"name": "LeftFrame-DayPart1",
"criteriaIndices": [0]
},
{
"frameId": "19889901",
"fillerIndices": [1],
"name": "RightFrame-DayPart1",
"criteriaIndices": [1]
},
{
"frameId": "1489431",
"fillerIndices": [0],
"name": "LeftFrame-DayPart2",
"criteriaIndices": [0]
},
{
"frameId": "18890012",
"fillerIndices": [1],
"name": "RightFrame-DayPart2",
"criteriaIndices": [1]
},
{
"frameId": "12437980",
"fillerIndices": [0],
"name": "LeftFrame-DayPart3",
"criteriaIndices": [2]
},
{
"frameId": "132795",
"fillerIndices": [1],
"name": "RightFrame-DayPart3",
"criteriaIndices": [2]
},
{
"frameId": "89001",
"fillerIndices": [0,1],
"name": "LeftFrame-DayPart4",
"criteriaIndices": [0]
},
{
"frameId": "1988457",
"fillerIndices": [0,1],
"name": "RightFrame-DayPart4",
"criteriaIndices": [1]
}
],
"geometries": [
{
"width": 1920,
"height": 1080,
"fullscreen": true
}
]
"fillers": [
{
"contentIndex": 3,
"duration": "30s"
}
},
{
"contentIndex": 4,
"duration": "60s"
}
}
],
"criterias": [
{
"criteriaId": 36890241,
"name": "CriteriaForLeftFrame"
},
{
"criteriaId": 36890456,
"name": "CriteriaForRightFrame"
},
{
"criteriaId": 36890625,
"name": "AnotherCriteria"
}
]
"dataSynchronizations": [
{
"from": "https://source.test.com/data.txt",
"to": "common/data.txt",
"behavior": "FILE_SYNCHRONIZATION",
"expiry": "0s",
"refreshPeriod": "6000s",
"timeoutPeriod": "120s"
}
]
}
Note : Certaines valeurs « 0 » ont été incluses dans cet exemple par souci de clarté. En fait, les valeurs 0 sont omises dans la sortie sérialisée et doivent être considérées comme la valeur par défaut. Les valeurs par défaut de tout autre type utilisé sont également omises des résultats (« false » pour les valeurs booléennes et "" pour les valeurs de chaîne). Ceci est fait pour des raisons de performance et de taille de charge utile.
Une fois promu, le nouveau lecteur apparaît dans Broadsign Control Administrator sous l'onglet de ressources Players. Pour plus d'informations, voir Lecteurs (Ressource) dans la documentation Broadsign Control.
curl -X POST https://air.broadsign.com/playlist/v1/confirm_playback \
-H 'Authorization: Bearer cbdbc369a063de6c0f458557f1456602' \
-d '{
"player_identifier": "abcd1234",
"screen_identifier" : "1",
"confirmed_items": [
{
"playlist_item_token":"CgphbGV4YW5kcmVjEgNVVEMaDAj22I7oBRCAhLjZASICCAUoAToDCNMBQgMIlRtKAwiSG2IDVVUwcgMI4BE=",
"custom_data": { "ext1":"", "ext2": "" }
}
]
}'
