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
Path | Method | Description |
---|---|---|
/api/version | GET | Returns the server version |
/api/obj_count | GET | Returns counts of key server objects; useful for identifying memory leaks |
/api/domain_apps | GET | Returns the domain configuration list and associated app information |
/api/domain_streams | GET | Returns online streams under a specified domain |
/api/app_streams | GET | Returns online streams under a specified domain and app |
/api/cut_off_stream | POST | Forcefully disconnects a specified stream |