Watcher Core API (22.06.1-92)

Download OpenAPI specification:Download

This is an API for Watcher Core subsystem. Watcher Core is the part of Flussonic Watcher providing you with options for managing streams, events, and Agents in a cluster of several streamers (i.e. Flussonic Media Servers) through a single point of access.

Watcher Core does not include features for managing users and their permissions. This part is Watcher VMS subsystem.

Watcher VMS addresses Watcher Core when users manage cameras (streams), Agents, and events. However, you may use Watcher Core for any streams, not only cameras.

Streamer 1
             Watcher Core <-> Watcher VMS
Streamer N

You can install Watcher Core subsystem on your local server or use Flussonic Cloud implementation of this API.

Some methods in Watcher Core API may look very similar to Flussonic Media Server API, but you should pay attention to some parameters that are different. For example, all streams are created manually in Watcher Core while streams with dynamic names are not supported so you will not find the named_by parameter in the stream config or the part parameter in the stream_save method. Do not rely on any undocumented parameters.

Authentication

bearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

stream

List streams

This API method is one of the most important in whole API, because it gives the list of all streams, including:

  • configured (maybe not running at the moment)
  • running (including those that are created via template and do not have own disk configuration)
  • remote (available from other servers)
  • only recorded

You can pass any stream configuration options to the q query string for filtering, not only those specified in the select parameters.

This method, as well as stream_get, will return the effective stream configuration with all templates, overrides, defaults included into the response. It is not exactly what you can see in your disk config. If you have configured this stream in disk file, then the original disk configuration can be found in the config_on_disk field.

Thus, what you get from this API call may differ from what you write to stream_save which is another important method for managing streams.

Authorizations:
query Parameters
select
string
Example: select=name,inputs,stats,dvr.root

Comma-separated list of fields (including nested) that will be returned.

Use parent.child notation to mention nested (child) fields.

sort
string
Example: sort=-stats.bitrate,name

Composite sort direction. Specify field name(s) using comma , as a separator.

Default sorting order is alphabetical by name.

Place - before the field name to sort in reverse alphabetical order or descending.

limit
integer
Example: limit=100

Limit the number of records in the selected collection to N elements. Default value is 100

cursor
string
Example: cursor=JTI0cG9zaXRpb25fZ3Q9MQ==

A properly encoded equivalent of offset allowing you to read the next bunch of items. We do not offer common offset fields, so please use cursor for predictable fetching of quickly changing list of items.

q
string
Example: q=somepattern

Search pattern for text fields like name, title, urls, etc.

Responses

Response samples

Content type
application/json
{
  • "estimated_count": 5,
  • "next": "JTI0cG9zaXRpb25fZ3Q9MA==",
  • "prev": "JTI0cG9zaXRpb25fbHQ9MSYlMjRyZXZlcnNlZD10cnVl",
  • "timing": { },
  • "streams": [
    ]
}

Get one stream

This method allows you to fetch a single stream. The data returned in this method are the same as for streams_list operation.

Authorizations:
path Parameters
name
required
string
Example: abc

Stream name

Responses

Response samples

Content type
application/json
{
  • "name": "hockey1",
  • "title": "Hockey channel",
  • "template": "sports-hd",
  • "static": true,
  • "inputs": [
    ],
  • "thumbnails": {},
  • "dvr": {
    },
  • "on_play": {
    },
  • "prepush": false,
  • "cluster_ingest": {
    },
  • "vision": {
    },
  • "stats": {
    }
}

Save stream

Create or update a stream by its name. If the stream doesn't exists in the disk config, it will be created.

If you pass only a partial stream configuration, just the passed field(s) will be updated, not the whole stream.

To create a new stream the property name is required.

Pass the "$reset": true option to replace the stream configuration with the provided one.

Authorizations:
path Parameters
name
required
string
Example: abc

Stream name

Request Body schema: application/json

Partial stream configuration

name
string or null <media_name>

Globally unique stream name.

title
string or null

Human-readable title of the stream. Provided for SDT MPEG-TS table or SDP RTSP title parameter.

template
string or null <media_name>

Template of the stream.

static
boolean or null
Default: true

A flag showing if the stream is captured continuously (true) or on-demand (false).

Array of objects or null

List of stream inputs.

object or null

Configuration of thumbnails generator.

object or null

DVR configuration.

object or null

Configuration of authorization backend for play sessions.

(boolean or null) or (integer or null)

The time (in seconds) that Flussonic reserves for preloading the data, i. e. buffering.

object or null

Server configuration for a cluster ingest group. Used to connect several servers between each other to capture the stream(s) and prevent the failover when one of the servers (peers) fails. More information about the cluster ingest here.

object or null

Video analytics AI parameters.

Responses

Request samples

Content type
application/json
{
  • "name": "hockey1",
  • "title": "Hockey channel",
  • "template": "sports-hd",
  • "static": true,
  • "inputs": [
    ],
  • "thumbnails": {},
  • "dvr": {
    },
  • "on_play": {
    },
  • "prepush": false,
  • "cluster_ingest": {
    },
  • "vision": {
    }
}
<