/api/channel/dashboard

Use this interface to obtain global or a specified channel statistics information.

Channel viewing Permissions is required.

Prototype

Protocol HTTP/HTTPS GET
URL ip[:port]/api/channel/dashboard
Content-Type Response: Content-Type: application/json

Request URL parameters

Parameter Description
start Start number
count Maximum value returned.
live Set to 1 to get only the current live channels.
output-start Optional parameter, used to set the start index of the output in the channel, and the default value is 0.
output-count Optional parameter, used to set the number of outputs returned in the channel, if not configured the default is 10
client-start Optional parameter, used to set the start index of client in the channel, and the default value is 0.
client-count Optional parameter, used to set the number of client returns in the channel, if not configured the default is 10
history Optional parameter, set to 1 will return the history of the total traffic of all channels.
sort Sorting algorithms, by name is supported. By default, the devices are sorted by register time.
order Available when 'sort' = name, options are descending, and ascending.

Request Example

GET /api/channel/dashboard?count=3&history=0&output-count=2&start=0 HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
info Golbal statistics of channel
channels Refer to Channel list
Global Statistics for Channels
Parameter Description
date-time Current system time of the server, in seconds
channel Global channel statistics information, refer to Global channel count information
data-in Total received data statistics for all channels, refer to Network Data Statistics
data-out Total transmitted data statistics for all channels, refer to network data statistics
Global Channel Count Information
Parameter Description
enable-num Number of channels currently enabled
limit-num Current maximum number of channels that can be enabled
live-num Number of channels which are streaming
limit-create-num Maximum number of channels supported
used-num Number of channels currently created.
Network Data Statistics
Parameter Description
mbps-s Data traffic per second in Mb.
mbps-m Average bit rate statistics for the past minute in Mb.
mbps-h Average bit rate statistics for the past hour in Mb.
hist-s Historical data traffic for the last 60 seconds in Mb. only present if request parameter history is set to 1.
hist-m Historical data traffic for the last 60 minutes in Mb. only present if request parameter history is set to 1.
Channel List
Parameter Description
list Detailed information about the channels in the form of a list, refer to Channel Statistics for the data structure of each channel.
start The start count of the channel corresponds to call start
total Total number of channels on the server.

Response Example

{
    "channels": {
        "list": [
            {
                "config": {
                    "enable": true,
                    "play-key": "PULL-69A8534C-0619-4745-A882-1C6951C24D66",
                    "protocol": {
                        "prefer": 1,
                        "rtmp": true,
                        "srt": true
                    },
                    "push-key": "PUSH-29CACFC0-DFAF-45FF-9200-BA6A53708986"
                },
                "id": 100054,
                "input": {
                    "addr": "",
                    "conn-state": 10,
                    "device": {
                        "is-online": true,
                        "product-id": 790,
                        "sn": "C316230601002",
                        "warn": 0
                    },
                    "id": 20,
                    "kbps": 33647,
                    "name": "Ultra Encode C316230601002",
                    "protocol": 1,
                    "state": 2,
                    "type": 257
                },
                "name": "%9",
                "preview": {
                    "img-url": "998190d3-c8a6-486f-bd1c-e6731ca46895",
                    "video-url": {
                        "flv": "PULL-69A8534C-0619-4745-A882-1C6951C24D66"
                    }
                },
                "state": 2,
                "status": {
                    "in-kbps": 33647,
                    "living-time-s": 103076,
                    "num-client": 0,
                    "out-kbps": 0
                },
                "url": {
                    "rtmp": {
                        "app": "live",
                        "play": "PULL-69A8534C-0619-4745-A882-1C6951C24D66",
                        "port": 1935,
                        "push": "PUSH-29CACFC0-DFAF-45FF-9200-BA6A53708986"
                    },
                    "srt": {
                        "passphrase": "1234567890",
                        "play": "PULL-69A8534C-0619-4745-A882-1C6951C24D66",
                        "port": 80,
                        "push": "PUSH-29CACFC0-DFAF-45FF-9200-BA6A53708986"
                    }
                }
            },
            {
                "config": {
                    "enable": true,
                    "play-key": "PULL-6346FFC8-5AC5-45B3-AA5C-886F56C54676",
                    "protocol": {
                        "prefer": 1,
                        "rtmp": true,
                        "srt": true
                    },
                    "push-key": "PUSH-29D40DE2-EDED-4C28-A364-C4FE5C8ACFC7"
                },
                "id": 100053,
                "name": "#1s",
                "outputs": {
                    "list": [
                        {
                            "conn-state": 2,
                            "id": 11089,
                            "is-serv": true,
                            "kbps": 0,
                            "living-time-s": 0,
                            "name": "rtsp_test",
                            "num-clients": 0,
                            "protocol": 16,
                            "state": 2,
                            "type": 514
                        }
                    ],
                    "start": 0,
                    "total": 1
                },
                "preview": {
                    "img-url": "43e6edba-b2e6-4041-b442-5a0d610970af"
                },
                "state": 2,
                "status": {
                    "in-kbps": 0,
                    "num-client": 0,
                    "out-kbps": 0
                },
                "url": {
                    "rtmp": {
                        "app": "live",
                        "play": "PULL-6346FFC8-5AC5-45B3-AA5C-886F56C54676",
                        "port": 1935,
                        "push": "PUSH-29D40DE2-EDED-4C28-A364-C4FE5C8ACFC7"
                    },
                    "srt": {
                        "passphrase": "1234567890",
                        "play": "PULL-6346FFC8-5AC5-45B3-AA5C-886F56C54676",
                        "port": 80,
                        "push": "PUSH-29D40DE2-EDED-4C28-A364-C4FE5C8ACFC7"
                    }
                }
            },
            {
                "config": {
                    "enable": false,
                    "play-key": "%",
                    "protocol": {
                        "prefer": 1,
                        "rtmp": true,
                        "srt": true
                    },
                    "push-key": "@"
                },
                "id": 100052,
                "input": {
                    "addr": "",
                    "conn-state": 0,
                    "device": {
                        "is-online": false,
                        "product-id": 787,
                        "sn": "A313220727002",
                        "warn": 0
                    },
                    "id": 1,
                    "kbps": 0,
                    "name": "ultra encode AIO 7002",
                    "protocol": 0,
                    "state": 0,
                    "type": 257
                },
                "name": "change2",
                "outputs": {
                    "list": [
                        {
                            "conn-state": 0,
                            "id": 11082,
                            "kbps": 0,
                            "living-time-s": 0,
                            "mode": "caller",
                            "name": "srt-233-mediahub-47",
                            "protocol": 2,
                            "report": {
                                "pkt-drop": 0,
                                "pkt-drop-total": 0,
                                "pkt-loss": 0.0
                            },
                            "state": 0,
                            "type": 514
                        },
                        {
                            "conn-state": 0,
                            "id": 11081,
                            "kbps": 0,
                            "living-time-s": 0,
                            "mode": "caller",
                            "name": "srt-233-mediahub-46",
                            "protocol": 2,
                            "report": {
                                "pkt-drop": 0,
                                "pkt-drop-total": 0,
                                "pkt-loss": 0.0
                            },
                            "state": 0,
                            "type": 514
                        }
                    ],
                    "start": 0,
                    "total": 3
                },
                "state": 1,
                "url": {
                    "rtmp": {
                        "app": "live",
                        "play": "%",
                        "port": 1935,
                        "push": "@"
                    },
                    "srt": {
                        "passphrase": "1234567890",
                        "play": "%",
                        "port": 80,
                        "push": "@"
                    }
                }
            }
        ],
        "start": 0,
        "total": 53
    },
    "clients": {
        "current-num": 0,
        "limit-num": 30
    },
    "info": {
        "channel": {
            "enable-num": 2,
            "limit-create-num": 1000,
            "limit-num": 1000,
            "live-num": 1,
            "used-num": 53
        },
        "data-in": {
            "mbps-h": 32.996239700734286,
            "mbps-m": 33.01496862192623,
            "mbps-s": 33.2822265625
        },
        "data-out": {
            "mbps-h": 0.0,
            "mbps-m": 0.0,
            "mbps-s": 0.0
        },
        "date-time": 0
    },
    "result": 0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""