Flussonic Media Server documentation

Getting Flussonic configuration through the HTTP API

Getting Flussonic configuration (read_config) Anchor Anchor x2

Flussonic can provide the information about its configuration in the JSON format via the HTTP API.

The request URL: /flussonic/api/read_config

Parameters:

  • skip_streams=true (optional). This parameter removes static streams from the output.

  • runtime=true (optional). This parameter fills the output configuration structure with runtime statistics for Flussonic, streams, archives, and so on.

Request example:

In the browser:

http://FLUSSONIC-IP:8080/flussonic/api/read_config

By using curl:

curl http://ADMIN:PASSWORD@FLUSSONIC:8080/flussonic/api/read_config

Response example:

{
    "auth": {
        "url": "http://localhost:3456"
    },
    "cluster_key": "xxxyyy123",
    "edit_auth": {
        "login": "flussonic",
        "password": "mypass123"
    },
    "http": [
        8080
    ],
    "lives": {
        "mylive": {
            "auth": {
                "url": "http://localhost:3456",
                "url_global": "http://localhost:3456"
            },
            "cluster_key": "xxxyyy123",
            "cluster_key_global": "xxxyyy123",
            "position": 1,
            "prefix": "mylive",
            "publish_enabled": true,
            "static": false
        }
    },
    "log_requests": true,
    "loglevel": "debug",
    "mysql": 3307,
    "plugins": {
        "vsaas": {
            "database": "sqlite:///opt/flussonic/priv/vsaas.db",
            "name": "vsaas",
            "position": 1
        }
    },
    "pulsedb": "/var/lib/pulse",
    "root": "wwwroot",
    "rtmp": 1935,
    "rtsp": 8554,
    "snmp": 3000,
    "streams": {
        "ort": {
            "auth": {
                "url": "http://localhost:3456",
                "url_global": "http://localhost:3456"
            },
            "cluster_key": "xxxyyy123",
            "cluster_key_global": "xxxyyy123",
            "name": "ort",
            "position": 1,
            "prepush": 10,
            "static": true,
            "transcoder": [
                [
                    "video_bitrate",
                    1024000
                ],
                [
                    "audio_bitrate",
                    100000
                ]
            ],
            "urls": [
                {
                    "url": "udp://239.1.2.3:1234"
                },
                {
                    "url": "hls://example.com/stream/index.m3u8"
                }
            ]
        }
    },
    "view_auth": {
        "login": "flussonic",
        "password": "viewpass"
    }
}

A request example with the parameter skip_streams:

http://FLUSSONIC-IP:8080/flussonic/api/read_config?skip_streams=true

or

curl http://ADMIN:PASSWORD@FLUSSONIC:8080/flussonic/api/read_config?skip_streams=true

A request example with the parameter runtime:

http://FLUSSONIC-IP:8080/flussonic/api/read_config?runtime=true

or

curl http://ADMIN:PASSWORD@FLUSSONIC:8080/flussonic/api/read_config?runtime=true