<SPX API v1

Explore the available API endpoints provided by this SPX Graphics instance. Use the expandable sections below to find the endpoints you need. See SPX Documentation for an introduction to the Control API.

spx-broadcast HOST-ID:
ec277a71-224e-bffb-84a2-06c1ec3d7711c

Use "localhost" addresses in examples

GET v1.1.2
http://172.18.0.4:5660/api/v1/version

Returns SPX version info

GET v1.0.14
http://172.18.0.4:5660/api/v1/feedproxy?url=https://feeds.bbci.co.uk/news/rss.xml&format=xml

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).

POST v1.3.0
http://172.18.0.4:5660/api/v1/feedproxy

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 Documentation for more info with keyword feedproxy.

// JSON example

{
    "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."
    }
}
GET v1.1.0
http://172.18.0.4:5660/api/v1/panic

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.

GET 1.0
http://172.18.0.4:5660/api/v1/rundown/focusFirst

Move focus to the first item on the rundown.

GET 1.0
http://172.18.0.4:5660/api/v1/rundown/focusNext

Move focus down to next item, will not circle back to top when end is reached.

GET 1.0
http://172.18.0.4:5660/api/v1/rundown/focusPrevious

Move focus up to previous item, will not circle back to bottom when top is reached.

GET 1.0
http://172.18.0.4:5660/api/v1/rundown/focusLast

Move focus to the last item on the rundown.

GET 1.0
http://172.18.0.4:5660/api/v1/rundown/focusByID/1234567890

Move focus by ID on the rundown.

GET 1.0
http://172.18.0.4:5660/api/v1/rundown/stopAllLayers

Animate all layers (used by the current rundown) out, but does not clear layers.

GET 1.0
http://172.18.0.4:5660/api/v1/item/play

Start focused item.

GET 1.0
http://172.18.0.4:5660/api/v1/item/play/1234567890

Start item by ID on the active rundown.

GET 1.0
http://172.18.0.4:5660/api/v1/item/continue

Issue continue command to selected item. Notice this needs support from the template itself and does not work as play or stop.

GET 1.0
http://172.18.0.4:5660/api/v1/item/continue/1234567890

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.

GET 1.0
http://172.18.0.4:5660/api/v1/item/stop/1234567890

Stop item by ID on the active rundown.

GET v1.0.12
http://172.18.0.4:5660/api/v1/invokeTemplateFunction?playserver=OVERLAY&playchannel=1&playlayer=19&webplayout=19&function=myCustomTemplateFunction&params=Hello%20World

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 Documentation for more info with keyword invoke.

GET v1.3.0
http://172.18.0.4:5660/api/v1/invokeExtensionFunction?function=sendCmd&params=incrementNumber

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 Documentation for more info with keyword invokeExtensionFunction.

POST v1.0.12, v.1.3.2
http://172.18.0.4:5660/api/v1/directplayout

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:

// JSON example

{
    "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"
    }
}
GET v1.1.0
http://172.18.0.4:5660/api/v1/controlRundownItemByID?file=MyFirstProject/MyFirstRundown&item=1234567890&command=play

Play / next / stop / preview / preview-next an item from a known rundown. (Remember you can rename rundown items from SPX GUI)

GET v1.1.0
http://172.18.0.4:5660/api/v1/objectDBPlayout/1234567890?command=play

Play / next / stop / preview / preview-next a graphic elements based on its MOS ID. This endpoint is reserved for Studio Automation system to playout/preview MOS objects.

GET v1.1.1
http://172.18.0.4:5660/api/v1/rundown/get

Returns current rundown as json.

GET v1.3.0
http://172.18.0.4:5660/api/v1/rundown/json?project=MyFirstProject&rundown=FirstRundown

Returns content of a specific rundown as json data.

POST v1.3.0
http://172.18.0.4:5660/api/v1/rundown/json

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 Documentation with keyword api rundown/json

// JSON example

{
    "project": "MyFirstProjectName",
    "file": "newRundown.json",
    "content": {
        "comment": "Playlist generated by MyApp",
        "templates": [
            {
                "description": "First template",
                "playserver": "OVERLAY",
                "etc": "..."
            },
            {
                "description": "Second template",
                "playserver": "OVERLAY",
                "etc": "..."
            }
        ]
    }
}
GET v1.1.1
http://172.18.0.4:5660/api/v1/getlayerstate

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!

GET v1.3.0
http://172.18.0.4:5660/api/v1/allrundowns

Returns all projects and rundowns

GET v1.1.1
http://172.18.0.4:5660/api/v1/getprojects

Returns projects as an array of strings.

GET v0.7.0
http://172.18.0.4:5660/api/v1/getProjectProfile?project=MyFirstProject

Returns profile of a specific project as json data.

GET v1.1.1
http://172.18.0.4:5660/api/v1/getrundowns?project=MyFirstProject

Returns rundown names of a given project as an array of strings.

GET v1.1.3
http://172.18.0.4:5660/api/v1/gettemplates?project=MyFirstProject

Returns templates and their settings from a given project.

GET v1.3.0
http://172.18.0.4:5660/api/v1/executeScript?file=win-open-calculator.bat

Execute a shell script/batch file in ASSETS/scripts folder using a shell associated with a given file extension.

GET v1.3.0
http://172.18.0.4:5660/api/v1/getFileList?assetsfolder=excel

Returns an array of filenames fround in a given subfolder of ASSETS, such as excel.

POST v0.7.0
http://172.18.0.4:5660/api/v1/saveCustomJSON

Creates or updates a JSON file in ASSETS folder or any path provided. This can be used for persisting arbitrary data to a JSON file. When path is provided, the file is saved to ASSETS/{path}/{filename}. When path is omitted, it saves to ASSETS/{filename}. The path property is optional.

// JSON example

{
    "path": "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
            }
        ]
    }
}
POST v0.9.2
http://172.18.0.4:5660/api/v1/sendUDPMessage

Sends a UDP message to a given host and port (default localhost:3333). This can be used to trigger external systems supporting UDP messages (such as OBS).

// JSON example

{
    "port": 3333,
    "host": "localhost",
    "message": "dve-preset-1"
}
POST v0.9.2
http://172.18.0.4:5660/api/v1/sendTCPMessage

Sends a TCP message to a given host and port (default localhost:5250). This can be used to trigger external systems supporting TCP messages (such as CasparCG).

// JSON example

{
    "port": 5250,
    "host": "localhost",
    "message": "MIXER 1-10 FILL 0.0 0.0 0.8 0.8 50 easeinoutsine"
}
POST v0.1.0
http://172.18.0.4:5660/api/v1/uploadAsset?path=media/images

Uploads an image file to the ASSETS folder. The optional path query parameter specifies a subfolder within ASSETS where the file will be saved. If omitted, the file is saved directly to the ASSETS folder. Supported image formats are JPEG, PNG, SVG, GIF, and WEBP. NOTE: Use multipart/form-data encoding for the POST request.