Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
en:zebrixrestapi [2018/09/20 14:47] admin ↷ Liens modifiés en raison d'un déplacement. |
en:zebrixrestapi [2021/08/25 10:29] (current) |
||
|---|---|---|---|
| Line 42: | Line 42: | ||
| {{public_media:en_api_screenapi_id.jpg|}} | {{public_media:en_api_screenapi_id.jpg|}} | ||
| + | |||
| + | ===== How to set content on a screen? ===== | ||
| + | |||
| + | Basically, you will have to post the following JSON | ||
| + | |||
| + | <code javascript>{'contentType':"page",'ContentId': contentId, 'useScheduling': False}</code> | ||
| + | |||
| + | * **contentType (string):** possible value « page » and « playlist » | ||
| + | * **contentId (integer)** : id of the content you want to set | ||
| + | * **useScheduling (boolean)** : false is mandatory when setting an arbitrary content. | ||
| + | |||
| + | To go back to schedule mode, you only need to POST the following JSON | ||
| + | |||
| + | <code javascript>{'useScheduling': True}</code> | ||
| + | |||
| + | to the following URL: | ||
| + | |||
| + | <code>POST : https://cmsv2.zebrix.net/api/screen/{screenID}/setContent</code> | ||
| + | |||
| + | To get ID of pages and playlist, you can make a GET request to following URLs: | ||
| + | |||
| + | * /api/screen | ||
| + | * /api/page | ||
| + | * /api/playlist | ||
| ===== How to use API for datasource ===== | ===== How to use API for datasource ===== | ||
