?apikey=1234567890
Commands to load playlists, move focus on the opened rundown etc.
http://10.58.0.8:5656/api/v1/rundown/load?file=MyFirstProject/MyFirstRundown | ||
GET | 1.0 | Open rundown from project / file. |
http://10.58.0.8:5656/api/v1/rundown/focusFirst | ||
GET | 1.0 | Move focus to the first item on the rundown. |
http://10.58.0.8:5656/api/v1/rundown/focusNext | ||
GET | 1.0 | Move focus down to next item, will not circle back to top when end is reached. |
http://10.58.0.8:5656/api/v1/rundown/focusPrevious | ||
GET | 1.0 | Move focus up to previous item, will not circle back to bottom when top is reached. |
http://10.58.0.8:5656/api/v1/rundown/focusLast | ||
GET | 1.0 | Move focus to the last item on the rundown. |
http://10.58.0.8:5656/api/v1/rundown/focusByID/1234567890 | ||
GET | 1.0 | Move focus by ID on the rundown. |
http://10.58.0.8:5656/api/v1/rundown/stopAllLayers | ||
GET | 1.0 | Animate all layers (used by the current rundown) out, but does not clear layers. |
Commands for rundown items. API response is rundown reference, id of rundown item and it's current playout status and server info.
http://10.58.0.8:5656/api/v1/item/play | ||
GET | 1.0 | Start focused item. |
http://10.58.0.8:5656/api/v1/item/play/1234567890 | ||
GET | 1.0 | Start item by ID on the active rundown. |
http://10.58.0.8:5656/api/v1/item/continue | ||
GET | 1.0 | Issue continue command to selected item. Notice this needs support from the template itself and does not work as play or stop. |
http://10.58.0.8:5656/api/v1/item/continue/1234567890 | ||
GET | 1.0 | Continue to item by ID on the active rundown. Notice this needs support from the template itself and does not work as play or stop. |
http://10.58.0.8:5656/api/v1/item/stop | ||
GET | 1.0 | Stop focused item. |
http://10.58.0.8:5656/api/v1/item/stop/1234567890 | ||
GET | 1.0 | Stop item by ID on the active rundown. |
Commands which does not require rundown to be loaded
http://10.58.0.8:5656/api/v1/directplayout | ||
POST | v1.0.12, v.1.3.2 | Populate template and execute a play/continue/stop -command to it. Please note the optional updateRundownItem property. updateRundownItemitemID is an optional object for forcing UI updates and persisting to defined rundown file. Please note: special charaters in values does not work at the moment! Post request body example as JSON: |
// Stringified JSON { "casparServer": "OVERLAY", "casparChannel": "1", "casparLayer": "20", "webplayoutLayer": "20", "relativeTemplatePath": "/vendor/pack/template.html", "out": "manual", "DataFields": [ { "field": "f0", "value": "Firstname" }, { "field": "f1", "value": "Lastname" } ], "command": "play", "updateRundownItem": { "updateUI": true, "itemID": "myItemID", "persist": true, "project": "myFirstProject", "rundown": "myFirstRundown" } } |
||
http://10.58.0.8:5656/api/v1/controlRundownItemByID?file=MyProject/FirstRundown&item=1234567890&command=play | ||
GET | v1.1.0 | Play / stop an item from a known rundown. (Remember you can rename rundown items from SPX GUI) |
Utility API calls
http://10.58.0.8:5656/api/v1/feedproxy?url=https://feeds.bbci.co.uk/news/rss.xml&format=xml | ||
GET | v1.0.14 | A proxy endpoint for passing feed data from CORS protected datasources. (If you need to pass url parameters use %26 instead of & to separate them). |
http://10.58.0.8:5656/api/v1/feedproxy | ||
POST | v1.3.0 | A POST version of the feedproxy endpoint. This endpoint is a helper for outgoing GET or POST requests requiring custom headers, such as Authorization or similar. Data is passed to the helper in the body of the POST request, in which url is the actual URL of the external endpoint. If the body contains a postBody -object, it will be passed to the outgoing API request as body . See principle in the example below, or search SPX Knowledge Base for more info with keyword feedproxy . |
// Stringified JSON { "url": "https://api.endpoint.com/requiring/customheaders/", "headers": { "key1": "my first value", "key2": "second value" }, "postBody": { "info": "If postBody is found, the outgoing request will be done using POST method, otherwise as GET." } } |
||
http://10.58.0.8:5656/api/v1/panic | ||
GET | v1.1.0 | Force clear to all output layers without out-animations. (Note, this does NOT save on-air state of rundown items to false, so when UI is reloaded the items will show the state before panic was triggered.) This is to be used for emergency situations only and not as a normal STOP command substitute. |
http://10.58.0.8:5656/api/v1/getprojects | ||
GET | v1.1.1 | Returns projects as an array of strings. |
http://10.58.0.8:5656/api/v1/getrundowns?project=MyProject | ||
GET | v1.1.1 | Returns rundown names of a given project as an array of strings. |
http://10.58.0.8:5656/api/v1/allrundowns | ||
GET | v1.3.0 | Returns all projects and rundowns |
http://10.58.0.8:5656/api/v1/rundown/get | ||
GET | v1.1.1 | Returns current rundown as json. |
http://10.58.0.8:5656/api/v1/rundown/json?project=MyProject&rundown=FirstRundown | ||
GET | v1.3.0 | Returns content of a specific rundown as json data. |
http://10.58.0.8:5656/api/v1/rundown/json | ||
POST | v1.3.0 | Creates or updates a rundown file. This can be used for example with application extensions. POST body:content must contain valid rundown JSON data, otherwise SPX controller may not be able to read it. For more info search SPX Knowledge Base with keyword api rundown/json |
// Stringified JSON { "project": "myProjectName", "file": "newRundown.json", "content": { "comment": "Playlist generated by MyApp", "templates": [ { "description": "First template", "playserver": "OVERLAY", "etc": "..." }, { "description": "Second template", "playserver": "OVERLAY", "etc": "..." } ] } } |
||
http://10.58.0.8:5656/api/v1/getlayerstate | ||
GET | v1.1.1 | Returns current memory state of web-playout layers of the server (not UI). Please note, if API commands are used to load templates, this may not return them as expected! |
http://10.58.0.8:5656/api/v1/version | ||
GET | v1.1.2 | Returns SPX version info |
http://10.58.0.8:5656/api/v1/gettemplates?project=MyProject | ||
GET | v1.1.3 | Returns templates and their settings from a given project. |
http://10.58.0.8:5656/api/v1/executeScript?file=win-open-calculator.bat | ||
GET | v1.3.0 | Execute a shell script/batch file in ASSETS/scripts folder using a shell associated with a given file extension. |
http://10.58.0.8:5656/api/v1/invokeTemplateFunction?playserver=OVERLAY&playchannel=1&playlayer=19&webplayout=19&function=myCustomTemplateFunction¶ms=Hello%20World | ||
GET | v1.0.12 | Uses an invoke handler to call a function in a template. See required parameters in the example call above. JSON objects can be passed as params by urlEncoding stringified JSON. Search SPX Knowledge Base for more info with keyword invoke . |
http://10.58.0.8:5656/api/v1/invokeExtensionFunction?function=sendCmd¶ms=incrementNumber | ||
GET | v1.3.0 | Uses SPX's messaging system to call a function in an extension. JSON objects can be passed as params by urlEncoding stringified JSON. The extension will need to implement SPX's messaging system, search SPX Knowledge Base for more info with keyword invokeExtensionFunction . |
http://10.58.0.8:5656/api/v1/getFileList?assetsfolder=excel | ||
GET | v1.3.0 | Returns an array of filenames fround in a given subfolder of ASSETS, such as excel . |
http://10.58.0.8:5656/api/v1/saveCustomJSON | ||
POST | v1.3.0 | Creates or updates a JSON file in ASSETS/json folder. This can be used for persisting arbitrary data to a JSON file. The content property of the below example gets saved to ASSETS/json/todoApp/myTodo.json . Note the subfolder property is optional. |
// Stringified JSON { "subfolder": "todoApp", "filename": "myData.json", "content": { "note": "Get these done by the end of month", "items": [ { "task": "Grow a beard", "done": false }, { "task": "Get a haircut", "done": true } ] } } |
||