/streams

Stream API allows clients to create new video streams from cameras with parameters.

After a JSON with array of parameters is submitted, server tries to create corresponding streams. If http query or JSON are invalid, the server responds with error description (HTTP status 400).

In case of internal error, the server responds with error description (HTTP status 500).

If error occurs for one stream, no streams will be created. As streams are created successfully, the client can query information about them.

It is also possible to request a video preview for the particular stream. Refer to streams/preview/ API for details.

post

Create streams from cameras with parameters. Returns array of streams UUIDs.

get

Get list of current stream parameters.

delete

Delete streams.

patch

Change stream parameters.

get

Get stream info.

delete

Delete one stream.

get

Allows clents to obtain stream preview as MotionJPEG: server sends JPEG stream of frames.

/metrics

Stream API allows clients to get all metrics about Face Stream's current state, like streams or translations count, errors, etc.

Output format can be obtained from "https://prometheus.io/".

Metrics is subdivided into two sections: global metrics (all streams information) and each stream's metrics.

Global metrics section is started with comment "# Global counters".

Each stream metrics section is started with comment like "# Stream name = 'stream name' uuid = 'stream uuid'".

Global metrics counters:

Create_stream_errors - streams creating errors counter. Tags: "code" (text code of error) and "msg" (description of error)

Streams_count - current streams count. Tags: "all" (all streams count) and "alive" (alive streams count)

Translations_count - current translations count

Streams metrics counters:

Streams_errors - count of errors occurred in attempts to open stream or read frame from it. Tags: "action" (open or read frame), "error" (text code of error), "msg" (description of error)

Skips_count - total frames, that have been skipped (not processed) because of high load

Detections_count - current frame face detections count (in development)

FPS - current FPS (of stream processing)

get

Allows clents to obtain metrics about streams.