Skip to content

Latest commit

 

History

History
81 lines (54 loc) · 2.49 KB

File metadata and controls

81 lines (54 loc) · 2.49 KB

HTTP API

Companion acts as a HTTP server, and can pass requests to specific modules using the /instance/LABEL/ path, where the LABEL is whatever you name the instance. For example, if Companion is running on http://localhost:8000/, and you're running an instance of the vMix module with the label vmix you could make requests to http://localhost:8000/instance/vmix/ENDPOINT, where ENDPOINT is one of the API endpoints listed below.

Some endpoints, such as Get Inputs, and Get Timers can be particularly useful as data sources in vMix itself, and because it's served from Companion itself it is fast and performant and so the recommended polling interval for these endpoints is 100ms, where as other endpoints such as Get Gynamics and Get Transitions aren't frequently changing so if you were to include them as a Data Source they can be polled less frequently.

Get Data

Returns the current data on the state of vMix
GET /instance/LABEL/data

Required Query Parameters

None

Optional Query Parameters

None


Get Dynamics

Returns Dynamic Inputs and Dynamic Values
GET /instance/LABEL/dynamics

Required Query Parameters

None

Optional Query Parameters

None


Get Inputs

Returns all inputs, or when input in specified returns data on that speciifc input (and its layers)
GET /instance/LABEL/inputs

Required Query Parameters

None

Optional Query Parameters

Only 1, or none, of:

Param Default Description
key "" Input GUID
number "" Input Number
title "" Input Short Title, or Title

Get Timers

Returns an array of current timers
GET /instance/LABEL/timers

Required Query Parameters

None

Optional Query Parameters

Param Default Description
default "" Value to be returned for times/laps in-progess
format mm:ss.ms Time format, hh:mm:ss, hh:mm:ss.ms, mm:ss, mm:ss.ms, mm:ss.sss, or auto
lap_progress current Show current lap time for "current" lap, "all" laps, or "none"
times 1 Minimum number of times/laps to return

Get Transitions

Returns the Transitions and the durations of preset transitions
GET /instance/LABEL/transitions

Required Query Parameters

None

Optional Query Parameters

Param Default Description
flat false When true the returned data will be structured as a single object