Watcher Admin API (24.11-300)

Download OpenAPI specification:Download

This is an admin API for Watcher VMS subsystem.

Use this API for managing Watcher and its infrastructure. For example, you can add streamers and manage user permissions.

Please note that content such as video from cameras cannot be accessed using this admin API. However, you can check the cameras status for troubleshooting. Use Watcher Client API for accessing content.

config

Get domain settings

The method allows you to get the domain settings

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{
  • "mail": {
    },
  • "appearance": {
    }
}

Save domain settings

The method allows you to save the domain settings

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
mail_smtp (object) or mail_sendgrid (object) (mail_spec)
object

Appearance settings allow you to edit the colors, logos, favicon and other brand UI settings of your service.

Responses

Request samples

Content type
application/json
{
  • "mail": {
    },
  • "appearance": {
    }
}

Response samples

Content type
application/json
{
  • "mail": {
    },
  • "appearance": {
    }
}

Get system settings

The method allows you to get the system settings

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{}

List Shared tokens

Method allows to fetch configured Shared tokens

Authorizations:
basicAuthbearerAuth

Responses

Response samples

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

Create Shared token

Method to create shared token

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json

configuration shared token

name
required
string

Unique name of the token that can be used to distinguish tokens

Array of objects

List of independent permissions, available for this shared token

media
string

Stream that this shared token provides access to.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "permissions": [
    ],
  • "media": "string"
}

Response samples

Content type
application/json
{
  • "key": "IJCo3KGLBf6NAqMCGgHf5gNhpl9",
  • "name": "string",
  • "permissions": [
    ],
  • "media": "string"
}

Delete Shared token

This method allows to delete a single shared token.

Authorizations:
basicAuthbearerAuth
path Parameters
key
required
string
Example: abc

Shared token key

Responses

streamer

List streamers

Returns the list of all streamers with main parameters and current metric values.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

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

Get the streamer

This method allows you to fetch the main parameters and current metrics of a single streamer

Authorizations:
basicAuthbearerAuth
path Parameters
hostname
required
string
Example: abc

Streamer hostname

Responses

Response samples

Content type
application/json
{
  • "role": "streamer",
  • "hostname": "peer.example.com",
  • "stats": {
    },
  • "channel_limit": 5,
  • "cluster_key": "xS6i6Q3DCc5nEvnu",
  • "public_payload_url": "http://public.example.com",
  • "private_payload_url": "http://streamer.local",
  • "dvrs": [
    ],
  • "config": {
    },
  • "total_bandwidth": 1024,
  • "labels": {
    }
}

Save the streamer

This method will either create a new streamer (if there is no streamer with the hostname specified in the request), or update the existing streamer having the specified hostname.

Authorizations:
basicAuthbearerAuth
path Parameters
hostname
required
string
Example: abc

Streamer hostname

query Parameters
checks_enable
boolean
Default: false
Example: checks_enable=true

This flag enables some checks before saving streamer. List of checks:

  • Watcher can reach the streamer (get its config);

If a request with checks_enable=true is sent, then if at least one of the checks fails, the streamer will not be saved.

Request Body schema: application/json

Partial streamer configuration

required
"streamer" (string) or "inference" (string) or "identification" (string)

Role of node

api_url
string <url>

The URL for provisioning of configuration from the managing server to the streamer. This URL does not have to be public but must be accessible from the managing server.

The API URL can also be used as Public and/or Private payload URL if they are not set. When used as Public payload URL, the API URL shall be public to allow playback from this streamer.

channel_limit
integer

Maximal number of streams.

cluster_key
required
string

The key for authorization for inter-Flussonic connections. All cluster peers should have the same cluster key.

public_payload_url
string <url>

The public address that is exposed to clients. It can also contain a port number. The client will be redirected to this URL and port when requesting for the stream captured on the peer even if other http port is set in the peer's own config.

private_payload_url
string <url>

The internal address for communication in a local network (by default, it is equal to API URL).

object

Flussonic Media Server configuration which will be provided to Streamer

total_bandwidth
integer <speed>

Server network bandwidth limit in kbit. This value is used to calculate the current network load status.

object (central_streamer_labels)

Streamer labels in key value format.

Responses

Request samples

Content type
application/json
{
  • "role": "streamer",
  • "channel_limit": 5,
  • "cluster_key": "xS6i6Q3DCc5nEvnu",
  • "public_payload_url": "http://public.example.com",
  • "private_payload_url": "http://streamer.local",
  • "config": {
    },
  • "total_bandwidth": 1024,
  • "labels": {
    }
}

Response samples

Content type
application/json
{
  • "role": "streamer",
  • "hostname": "peer.example.com",
  • "stats": {
    },
  • "channel_limit": 5,
  • "cluster_key": "xS6i6Q3DCc5nEvnu",
  • "public_payload_url": "http://public.example.com",
  • "private_payload_url": "http://streamer.local",
  • "dvrs": [
    ],
  • "config": {
    },
  • "total_bandwidth": 1024,
  • "labels": {
    }
}

Delete the streamer

Delete the streamer by its hostname.

Authorizations:
basicAuthbearerAuth
path Parameters
hostname
required
string
Example: abc

Streamer hostname

Responses

Dry run layouter for changed streamer configuration

This method allows you to see how the overall layout will be changed due to changes into streamer configuration. Note that if Layouter is disabled, this method will return an error.

Authorizations:
basicAuthbearerAuth
path Parameters
hostname
required
string
Example: abc

Streamer hostname

Request Body schema: application/json

A changes into stream or streamer configuration

required
"streamer" (string) or "inference" (string) or "identification" (string)

Role of node

api_url
string <url>

The URL for provisioning of configuration from the managing server to the streamer. This URL does not have to be public but must be accessible from the managing server.

The API URL can also be used as Public and/or Private payload URL if they are not set. When used as Public payload URL, the API URL shall be public to allow playback from this streamer.

channel_limit
integer

Maximal number of streams.

cluster_key
required
string

The key for authorization for inter-Flussonic connections. All cluster peers should have the same cluster key.

public_payload_url
string <url>

The public address that is exposed to clients. It can also contain a port number. The client will be redirected to this URL and port when requesting for the stream captured on the peer even if other http port is set in the peer's own config.

private_payload_url
string <url>

The internal address for communication in a local network (by default, it is equal to API URL).

object

Flussonic Media Server configuration which will be provided to Streamer

total_bandwidth
integer <speed>

Server network bandwidth limit in kbit. This value is used to calculate the current network load status.

object (central_streamer_labels)

Streamer labels in key value format.

Responses

Request samples

Content type
application/json
{
  • "role": "streamer",
  • "channel_limit": 5,
  • "cluster_key": "xS6i6Q3DCc5nEvnu",
  • "public_payload_url": "http://public.example.com",
  • "private_payload_url": "http://streamer.local",
  • "config": {
    },
  • "total_bandwidth": 1024,
  • "labels": {
    }
}

Response samples

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

cluster

Get current health of cluster

This method allows you to fetch cluster's health

Authorizations:
basicAuthbearerAuth
query Parameters
Openmetrics"openmetrics" (string)
Example: format=openmetrics

This parameter is used instead of the Accept header to select of non-JSON response content format.

Responses

Response samples

Content type
{
  • "version": 240100023,
  • "server_id": "123e4567-e89b-12d3-a456-426655440000",
  • "collected_at": 1000000000000,
  • "stream_metrics_total": {
    },
  • "agent_metrics_total": {
    },
  • "streamer_metrics_total": {
    },
  • "streamer_bitrate_metrics_total": {
    },
  • "streamer_metrics": [
    ]
}

auth

Get an auth token

The method creates a new temporary auth-token (JWT). The JTW token used as Bearer token in requests other than /login.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "refresh_token": "3637e790-5530-11ed-bdc3-0242ac120002"
}

user

List of users

List of available users

Authorizations:
basicAuthbearerAuth
query Parameters
select
string
Example: select=episode_id,media,close_reason

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

limit
integer
Example: limit=100

Limit select count in collection to N elements.

cursor
string
Example: cursor=JTI0cG9zaXRpb25fZ3Q9MQ==

Properly encoded analog of offset, allowing to read next bunch of items. We do not offer common offset fields, use please cursor for predictable fetching of quickly changing list of items. Learn more in Flussonic API design principles.

organization_id
integer

Organization identifier to select users only available for this organization. If the organization_id is not transferred, all available users will be returned.

Responses

Response samples

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

Create user

This method allows you to create a user

Authorizations:
basicAuthbearerAuth
header Parameters
Idempotency-Key
required
string <uuid>
Example: 8e03978e-40d5-43e8-bc93-6894a57f9324

The idempotency token guarantees that the same operation will not be executed twice. It is especially important in a cloud platform to make sure that credits are not deducted from the account several times for the same action.

Request Body schema: application/json

User data

name
string

User name (login)

fullname
string

The user's full name.

password
string

The specified password will be saved as a hash, used only for writing

email
string <email>

User's email. Required for password recovery.

phone
string <phone-number>

User's phone number

locale
string <ISO 639-1>

The language, selected by user.

note
string

Additional information or notes about the user.

max_sessions
integer

The maximum number of sessions the user can have simultaneously.

disabled
boolean
Default: false

A parameter that allows you to enable/disable the user

readonly
boolean

A flag indicating that the user has read-only access and cannot modify their own data.

"generic" (string) or "admin" (string)
Default: "generic"

The parameter regulates the rights for the user

organization_id
integer

The identifier of the Organization to which the user should be added. If no organization_id - default organization should be used.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "fullname": "string",
  • "password": "string",
  • "email": "user@example.com",
  • "phone": "+78007778413",
  • "locale": "en",
  • "note": "string",
  • "max_sessions": 0,
  • "disabled": false,
  • "readonly": false,
  • "access_level": "generic",
  • "organization_id": 12
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "fullname": "string",
  • "email": "user@example.com",
  • "phone": "+78007778413",
  • "locale": "en",
  • "note": "string",
  • "max_sessions": 0,
  • "id": 1,
  • "disabled": false,
  • "readonly": false,
  • "organizations": [
    ],
  • "access_level": "generic"
}

Get a user

This method allows you to fetch the user by its identifier

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
integer <snowflake_id>

User's identifier

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "fullname": "string",
  • "email": "user@example.com",
  • "phone": "+78007778413",
  • "locale": "en",
  • "note": "string",
  • "max_sessions": 0,
  • "id": 1,
  • "disabled": false,
  • "readonly": false,
  • "organizations": [
    ],
  • "access_level": "generic"
}

Save user

This method allows you to update user data

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
integer <snowflake_id>

User's identifier

Request Body schema: application/json

User data

name
string

User name (login)

fullname
string

The user's full name.

password
string

The specified password will be saved as a hash, used only for writing

email
string <email>

User's email. Required for password recovery.

phone
string <phone-number>

User's phone number

locale
string <ISO 639-1>

The language, selected by user.

note
string

Additional information or notes about the user.

max_sessions
integer

The maximum number of sessions the user can have simultaneously.

disabled
boolean
Default: false

A parameter that allows you to enable/disable the user

readonly
boolean

A flag indicating that the user has read-only access and cannot modify their own data.

"generic" (string) or "admin" (string)
Default: "generic"

The parameter regulates the rights for the user

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "fullname": "string",
  • "password": "string",
  • "email": "user@example.com",
  • "phone": "+78007778413",
  • "locale": "en",
  • "note": "string",
  • "max_sessions": 0,
  • "disabled": false,
  • "readonly": false,
  • "access_level": "generic"
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "fullname": "string",
  • "email": "user@example.com",
  • "phone": "+78007778413",
  • "locale": "en",
  • "note": "string",
  • "max_sessions": 0,
  • "id": 1,
  • "disabled": false,
  • "readonly": false,
  • "organizations": [
    ],
  • "access_level": "generic"
}

Delete a user

This method allows you to delete a user

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
integer <snowflake_id>

User's identifier

Responses

Get user's API key

The API key is used for authentication in API requests, allowing access to protected resources without using a password.

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
integer

User identifier

Responses

Response samples

Content type
application/json
{
  • "apikey": "string"
}

Create new API key for user

The API key is used for authentication in API requests, allowing access to protected resources without using a password.

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
integer

User identifier

Responses

Response samples

Content type
application/json
{
  • "apikey": "string"
}

stream

List streams

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

streams_list in Watcher Admin API:

  • can list all streams within the Watcher.
  • admin is not allowed to watch content from any cameras for security reasons.

streams_list in Watcher Client API:

  • return streams from organizations where you're member
  • prodives a playback token that allows play video from the camera.
Authorizations:
basicAuthbearerAuth
query Parameters
select
string
Example: select=episode_id,media,close_reason

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

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

Composite sort direction. Default sort order is named_by (config,user,remote), position, name.

limit
integer
Example: limit=100

Limit select count in collection to N elements.

cursor
string
Example: cursor=JTI0cG9zaXRpb25fZ3Q9MQ==

Properly encoded analog of offset, allowing to read next bunch of items. We do not offer common offset fields, use please cursor for predictable fetching of quickly changing list of items. Learn more in Flussonic API design principles.

q
string
Example: q=somepattern

Search pattern for different 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 to fetch a single stream. Refer to the streams_list operation to find out what data will be returned in this method.

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "comment": "This is a test stream",
  • "title": "Hockey channel",
  • "static": true,
  • "disabled": false,
  • "stats": {
    },
  • "inputs": [
    ],
  • "dvr": {
    },
  • "pushes": [
    ],
  • "labels": {
    },
  • "vision": {
    },
  • "organization_id": 9,
  • "coordinates": {
    },
  • "postal_address": "string",
  • "map_coordinates": {
    },
  • "onvif": {
    },
  • "preset_id": 0,
  • "folder_id": 0,
  • "audio": {
    },
  • "layout": {
    },
  • "path": [
    ],
  • "firmware_update_duration": 0,
  • "last_episode_at": 1000000000000,
  • "last_change": {
    }
}

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 try to update a stream that is started from a template by a user request having named_by=user, a new stream will be created in the disk config.

If you pass only a partial stream configuration, this field 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:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

stream name

query Parameters
part
string
Default: "config_on_disk"
Enum: "config_override" "config_on_disk"

The stream is configured by several origins of configuration. It may be config_on_disk or temporary runtime config_override that can be provided via on_play or on_publish backend, or edited via this API call if you pass config_override to this parameter.

Request Body schema: application/json

Partial stream configuration

comment
string

Human-readable description of the stream.

title
string

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

static
boolean
Default: true

Whether a stream is static or not. If set to True the server will try to keep this stream running even if there are no viewers or errors encountered.

Streamer restarts all static streams even if any internal errors occur and the static streams crash.

disabled
boolean

Whether a stream is disabled. Disabled streams are inactive and do not run. Displayed only with the API calls.

Array of Demo source (object) or File (object) or H323 (object) or HLS (object) or RTMP (object) or RTSP (object) or SRT (object) or TSHTTP (object) or Mixer (object) or Mosaic (object) or M4F (object) or M4S (object) or RTP (object) or SHOUTcast (object) or Timeshift (object) or Playlist (object) or Copy source (object) or SPTS (object) or MPTS (object) or Publish (object) or V4L (object) or Decklink SDI (object) or DekTec SDI (object) or NDI (object) or SMPTE 2110 (object) or FRIP (object)

List of stream inputs. Important: A stream without any inputs can receive video frames only if backup file is specified.

object (stream_dvr_spec)

DVR configuraton.

Array of RTMP (object)

A list of pushes. When a server initiates the connection and sends a stream to other server(s), it is called a push.

object <= 10 items

Stream labels in key value format.

object

Video analytics parameters.

organization_id
integer

ID of the organization the stream belongs to. Only organization owner or domain administrator could change it.

object

Camera coordinates on a map or a floor plan.

postal_address
string

Camera adress on a map.

object
Deprecated Delete at: 24.12

Camera coordinates on a map or a floor plan. Deprecated. Use coordinates instead.

object

Onvif configuration

preset_id
integer

Preset identificator.

folder_id
integer

Folder identificator.

object

Audio settings for the stream.

object (central_stream_layout)

Layouts information

Responses

Request samples

Content type
application/json
{
  • "comment": "This is a test stream",
  • "title": "Hockey channel",
  • "static": true,
  • "disabled": false,
  • "inputs": [
    ],
  • "dvr": {
    },
  • "pushes": [
    ],
  • "labels": {
    },
  • "vision": {
    },
  • "organization_id": 9,
  • "coordinates": {
    },
  • "postal_address": "string",
  • "map_coordinates": {
    },
  • "onvif": {
    },
  • "preset_id": 0,
  • "folder_id": 0,
  • "audio": {
    },
  • "layout": {
    }
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "comment": "This is a test stream",
  • "title": "Hockey channel",
  • "static": true,
  • "disabled": false,
  • "stats": {
    },
  • "inputs": [
    ],
  • "dvr": {
    },
  • "pushes": [
    ],
  • "labels": {
    },
  • "vision": {
    },
  • "organization_id": 9,
  • "coordinates": {
    },
  • "postal_address": "string",
  • "map_coordinates": {
    },
  • "onvif": {
    },
  • "preset_id": 0,
  • "folder_id": 0,
  • "audio": {
    },
  • "layout": {
    },
  • "path": [
    ],
  • "firmware_update_duration": 0,
  • "last_episode_at": 1000000000000,
  • "last_change": {
    }
}

Delete the stream

This method allows to delete a single stream. You can delete config_override by this API call if you want to remove all runtime overrides.

If you do not specify any part parameter, this stream will be deleted from config_on_disk and if it was named_by: config, then it will immediately stop.

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

stream name

query Parameters
part
string
Default: "config_on_disk"
Enum: "config_override" "config_on_disk"

part of config to delete

Responses

Get layouts of stream

This method allows you to fetch stream layouts list

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name

query Parameters
created_at_gt
integer <utc_ms> [ 1000000000000 .. 10000000000000 ]
Example: created_at_gt=1730844572000

Get layouts created after this timestamp

created_at_lt
integer <utc_ms> [ 1000000000000 .. 10000000000000 ]
Example: created_at_lt=1730844572000

Get layouts created before this timestamp

limit
integer
Example: limit=5

Limit the number of returned layouts

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.

Responses

Response samples

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

Dry run layouter for changed stream configuration

This method allows you to see how the overall layout will be changed due to changes into stream configuration. Note that if Layouter is disabled, this method will return an error.

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name

Request Body schema: application/json

A changes into stream or streamer configuration

comment
string

Human-readable description of the stream.

title
string

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

static
boolean
Default: true

Whether a stream is static or not. If set to True the server will try to keep this stream running even if there are no viewers or errors encountered.

Streamer restarts all static streams even if any internal errors occur and the static streams crash.

disabled
boolean

Whether a stream is disabled. Disabled streams are inactive and do not run. Displayed only with the API calls.

Array of Demo source (object) or File (object) or H323 (object) or HLS (object) or RTMP (object) or RTSP (object) or SRT (object) or TSHTTP (object) or Mixer (object) or Mosaic (object) or M4F (object) or M4S (object) or RTP (object) or SHOUTcast (object) or Timeshift (object) or Playlist (object) or Copy source (object) or SPTS (object) or MPTS (object) or Publish (object) or V4L (object) or Decklink SDI (object) or DekTec SDI (object) or NDI (object) or SMPTE 2110 (object) or FRIP (object)

List of stream inputs. Important: A stream without any inputs can receive video frames only if backup file is specified.

object (stream_dvr_spec)

DVR configuraton.

Array of RTMP (object)

A list of pushes. When a server initiates the connection and sends a stream to other server(s), it is called a push.

object <= 10 items

Stream labels in key value format.

object

Video analytics parameters.

organization_id
integer

ID of the organization the stream belongs to. Only organization owner or domain administrator could change it.

object

Camera coordinates on a map or a floor plan.

postal_address
string

Camera adress on a map.

object
Deprecated Delete at: 24.12

Camera coordinates on a map or a floor plan. Deprecated. Use coordinates instead.

object

Onvif configuration

preset_id
integer

Preset identificator.

folder_id
integer

Folder identificator.

object

Audio settings for the stream.

object (central_stream_layout)

Layouts information

Responses

Request samples

Content type
application/json
{
  • "comment": "This is a test stream",
  • "title": "Hockey channel",
  • "static": true,
  • "disabled": false,
  • "inputs": [
    ],
  • "dvr": {
    },
  • "pushes": [
    ],
  • "labels": {
    },
  • "vision": {
    },
  • "organization_id": 9,
  • "coordinates": {
    },
  • "postal_address": "string",
  • "map_coordinates": {
    },
  • "onvif": {
    },
  • "preset_id": 0,
  • "folder_id": 0,
  • "audio": {
    },
  • "layout": {
    }
}

Response samples

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

Get one stream camera config

This method allows to fetch a single stream camera config info.

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name.

Responses

Response samples

Content type
application/json
{
  • "sensor": {
    },
  • "camera_info": {
    },
  • "media_quality": "low"
}

Save stream camera config

Create or update a stream config by its name.

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

stream name

Request Body schema: application/json

Partial stream config configuration

sensor (object) or error_response (object)

Describes sensor configuration.

(media_quality (Low"low" (any) or Medium"medium" (any) or High"high" (any))) or error_response (object)

These parameters allow optimizing media quality and performance based on device capabilities and network conditions.

Responses

Request samples

Content type
application/json
{
  • "sensor": {
    },
  • "camera_info": {
    },
  • "media_quality": "low"
}

Response samples

Content type
application/json
{
  • "sensor": {
    },
  • "camera_info": {
    },
  • "media_quality": "low"
}

Save auth for camera

Create or update a auth for camera by its name.

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name.

Responses

Response samples

Content type
application/json
{
  • "login": "string",
  • "password": "string",
  • "port": 0
}

Get auth for camera

Create or update a auth for camera by its name.

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name.

Responses

Response samples

Content type
application/json
{
  • "login": "string",
  • "password": "string",
  • "port": 0
}

Reboot camera

Reboot camera

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name.

Responses

Update camera firmware

This method allows you to update camera firmware

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: abc

Stream name.

Request Body schema: application/json

Protocol data and firmware for update camera

image
required
any <binary>

Image for updating camera. Documentation for updating cameras: https://flussonic.com/doc/flussonic-home-v1/#upgrade.

Iris"iris" (string) or ISAPI/PSIA"isapi" (string) or Xm"xm" (string) or MSTAR/Sputnik"sputnik" (string)
Default: "iris"

Protocol for connecting to camera.

Responses

Request samples

Content type
application/json
{
  • "image": "b'DL\u0003\u0004\u0014\u0000'",
  • "proto": "iris"
}

preset

List presets

The presets in Watcher is a set of DVR and analytics parameters that you can use as a template when creating and configuring cameras. When you select a preset in the camera settings, the parameters from the preset are populated to the camera settings. A set of presets on the camera is defined by the set of presets selected for the camera's Organization. https://flussonic.com/doc/manage-presets-in-watcher-ui/

This method is used to get info about presets. If the organization_id is transferred this method will return presets only allowed in organization with that Id.

Authorizations:
basicAuthbearerAuth
query Parameters
select
string
Example: select=episode_id,media,close_reason

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

limit
integer
Example: limit=100

Limit select count in collection to N elements.

cursor
string
Example: cursor=JTI0cG9zaXRpb25fZ3Q9MQ==

Properly encoded analog of offset, allowing to read next bunch of items. We do not offer common offset fields, use please cursor for predictable fetching of quickly changing list of items. Learn more in Flussonic API design principles.

organization_id
integer

Organization identifier to select presets only available for this organization. If the organization_id is not transferred, all available presets will be returned.

Responses

Response samples

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

Create preset

This method will create a new preset.

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json

Preset params.

title
required
string

Human-readable name of the preset.

is_adjustable
boolean
Default: true

Shows if the preset is adjustable. is_adjustable is needed for a situation where presets are managed by external billing. If is_adjustable: true user can change camera settings meanwhile using this preset. If is_adjustable: false user can not change camera settings meanwhile using this preset.

If the camera has a non-adjustable presets, the DVR and analytics parameters from PUT requests will not be applied. In this case, either make the preset adjustable, or change the preset itself to achieve the required configuration.

object (stream_dvr_spec)

DVR configuration

object

Vision configuration

is_default
boolean

Shows if the preset is available in all Organizations.

Responses

Request samples

Content type
application/json
{
  • "title": "Example preset name",
  • "is_adjustable": true,
  • "dvr": {
    },
  • "vision": {
    },
  • "is_default": true
}

Response samples

Content type
application/json
{
  • "id": 7,
  • "title": "Example preset name",
  • "is_adjustable": true,
  • "dvr": {
    },
  • "vision": {
    },
  • "is_default": true,
  • "deleted_at": 1637095014573
}

Get one preset

This method is used to get info about preset by its id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
integer <snowflake_id>

Preset's identifier

Responses

Response samples

Content type
application/json
{
  • "id": 7,
  • "title": "Example preset name",
  • "is_adjustable": true,
  • "dvr": {
    },
  • "vision": {
    },
  • "is_default": true,
  • "deleted_at": 1637095014573
}

Update preset

This method will update the existing preset with the specified id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
integer <snowflake_id>

Preset's identifier

Request Body schema: application/json

Preset params.

title
required
string

Human-readable name of the preset.

is_adjustable
boolean
Default: true

Shows if the preset is adjustable. is_adjustable is needed for a situation where presets are managed by external billing. If is_adjustable: true user can change camera settings meanwhile using this preset. If is_adjustable: false user can not change camera settings meanwhile using this preset.

If the camera has a non-adjustable presets, the DVR and analytics parameters from PUT requests will not be applied. In this case, either make the preset adjustable, or change the preset itself to achieve the required configuration.

object (stream_dvr_spec)

DVR configuration

object

Vision configuration

is_default
boolean

Shows if the preset is available in all Organizations.

Responses

Request samples

Content type
application/json
{
  • "title": "Example preset name",
  • "is_adjustable": true,
  • "dvr": {
    },
  • "vision": {
    },
  • "is_default": true
}

Response samples

Content type
application/json
{
  • "id": 7,
  • "title": "Example preset name",
  • "is_adjustable": true,
  • "dvr": {
    },
  • "vision": {
    },
  • "is_default": true,
  • "deleted_at": 1637095014573
}

agent

List Agents

The list of configured and provisioned Agents, i.e. Agents that connected to your server at least once.

Authorizations:
basicAuthbearerAuth
query Parameters
select
string
Example: select=episode_id,media,close_reason

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

limit
integer
Example: limit=100

Limit select count in collection to N elements.

cursor
string
Example: cursor=JTI0cG9zaXRpb25fZ3Q9MQ==

Properly encoded analog of offset, allowing to read next bunch of items. We do not offer common offset fields, use please cursor for predictable fetching of quickly changing list of items. Learn more in Flussonic API design principles.

stream
string

Filter agents by stream presence. If any stream has the agent in its inputs, the agent will not be returned with filter stream_is=null.

organization_id
integer

Organization identifier to select agents only available for this organization. If the organization_id is not transferred, all available agents will be returned.

title_like
string

Filter agents by stream title using partial match. The search is case-insensitive and matches any part of the stream title.

Responses

Response samples

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

monitoring

Readiness probe

K8s readiness probe.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{
  • "server_version": "23.04",
  • "build": 0,
  • "now": 1000000000000,
  • "started_at": 1639337825
}

Liveness probe

K8s liveness probe.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{
  • "server_version": "23.04",
  • "build": 0,
  • "now": 1000000000000,
  • "started_at": 1639337825
}

events

Get events of Watcher

This method allows to get the batch of events. Currently this method is not implemented yet. However, its schema can be used for understanding Watcher logging.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

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

organization

Update organizations preset

Save organization preset by its id or adds new preset to organization.

Authorizations:
basicAuthbearerAuth
path Parameters
organization_id
required
integer

Organization identifier

Request Body schema: application/json

Organization preset info

preset_id
integer

Preset identifier

Responses

Request samples

Content type
application/json
{
  • "preset_id": 7
}

Response samples

Content type
application/json
{
  • "id": 7,
  • "title": "Example preset name",
  • "is_adjustable": true,
  • "dvr": {
    },
  • "vision": {
    },
  • "is_default": true,
  • "deleted_at": 1637095014573
}

Delete preset from organization

This method allows to remove a specific preset from organization.

Authorizations:
basicAuthbearerAuth
path Parameters
organization_id
required
integer

Organization identifier

preset_id
required
integer

Preset identifier

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}