Skip to content

Getting Flussonic configuration through the HTTP API

Getting Flussonic configuration (read_config)

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, DVR RAID (including migration), and so on.

Request example:

In the browser:

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

By using curl:

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

Response example:


{
    "admin_http":[],
    "admin_https":[],
    "auth_backends": {
        "main": {
            "allow_default": false,
            "backends": [
                {
                    "url": "http://localhost:3456"
                }
            ],
            "name": "main",
            "position": 0
        }
    },
    "auth_token": "me",
    "dvrs": {
        "dvr1": {
            "disk_space": 107374182400,
            "dvr_limit": 3600,
            "name": "dvr1",
            "position": 0,
            "root": "/storage/dvr1"
        }
    },
    "edit_auth": {
        "login": "flussonic",
        "password": "password123"
    },
    "http": [
        80,
        8080
    ],
    "https":[],
    "includes":[],
    "lives": {
        "mylive": {
            "position": 0,
            "prefix": "mylive",
            "static": false,
            "urls": [
                {
                    "url": "publish://"
                }
            ]
        }
    },
    "log_requests": false,
    "loglevel":"debug",
    "nvidia_monitor": false,
    "pulsedb": "/var/lib/flussonic",
    "rtmp": 1935,
    "rtsp": 554,
    "session_log": "/var/lib/flussonic",
    "srt":9998,
    "streams": {
        "bunny": {
            "name": "bunny",
            "position": 1,
            "static": true,
            "title": "bunny",
            "urls": [
                {
                    "url": "file://vod/bunny.mp4"
                }
            ]
        },
        "fake": {
            "name": "fake",
            "position": 0,
            "static": true,
            "title": "fake",
            "urls": [
                {
                    "url": "fake://fake"
                }
            ]
        }
    },
    "vods": {
        "vod": {
            "auto_mbr": false,
            "download": false,
            "position": 0,
            "prefix": "vod",
            "pulse_off": false,
            "urls": [
                {
                    "url": "/storage"
                }
            ]
        }
    }
}

A request example with the parameter skip_streams:

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

or

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

A request example with the parameter runtime:

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

or

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