Skip to content

HTTP API Interface

Introduction

MMS is a high-performance media streaming processing service that provides a comprehensive HTTP RESTful API. It supports core features such as real-time stream management, resource monitoring, and recording control.

Features:

📊 Real-time stream status monitoring ⚖️ Server load querying 🚫 Forcefully disconnect abnormal streams 🎥 Stream recording lifecycle management 🌐 Dynamic pull-stream control 🔒 JWT token authentication 📦 JSON data format communication

API Specification

Basic Info

  • Base URL: http://<server_ip>:<server_port>/api/v1
  • Authentication: Authorization: Bearer <your_api_key>
  • Response Format: Unified JSON structure
json
{
  "code": 0,
  "data": {},
  "message": "success"
}

Configuration

First, enable the HTTP API in the top-level configuration file config/mms.yaml:

yaml
http_api:
  enabled: on               # Enable
  port: 8080                # Listening port

API List

PathMethodDescription
/api/versionGETReturns the server version
/api/obj_countGETReturns counts of key server objects; useful for identifying memory leaks
/api/domain_appsGETReturns the domain configuration list and associated app information
/api/domain_streamsGETReturns online streams under a specified domain
/api/app_streamsGETReturns online streams under a specified domain and app
/api/cut_off_streamPOSTForcefully disconnects a specified stream

Released under the MIT License.