API Reference
Complete reference for Mcaster1DNAS admin API, source connection protocol, and programmatic integration.
Admin API Endpoints
RESTful API for server administration and statistics
Retrieve comprehensive server statistics in XML format including listener counts, source information, and mount point details.
curl -X GET https://stream.example.com:8443/admin/stats.xml \ -u admin:password
Response (200 OK)
<iceresponse>
<admin>admin@example.com</admin>
<host>stream.example.com</host>
<location>USA</location>
<server_id>Mcaster1DNAS 2.5.1-rc1</server_id>
<listeners>142</listeners>
<sources>3</sources>
<source mount="/stream">
<listeners>85</listeners>
<genre>Rock</genre>
<bitrate>128</bitrate>
</source>
</iceresponse>
Get a list of all active mount points with detailed information about each stream.
curl -X GET https://stream.example.com:8443/admin/listmounts \ -u admin:password
Retrieve a list of connected listeners for a specific mount point including IP addresses and connection duration.
| Parameter | Type | Required | Description |
|---|---|---|---|
| mount | string | Required | Mount point path (e.g., /stream) |
curl -X GET "https://stream.example.com:8443/admin/listclients?mount=/stream" \ -u admin:password
Update stream metadata (song title, artist, etc.) for a specific mount point.
| Parameter | Type | Required | Description |
|---|---|---|---|
| mount | string | Required | Mount point path |
| mode | string | Required | Update mode (updinfo) |
| song | string | Optional | Song title and artist |
curl -X GET "https://stream.example.com:8443/admin/metadata" \ -u admin:password \ -d "mount=/stream&mode=updinfo&song=Artist%20-%20Song%20Title"
Disconnect a source connection from the server.
| Parameter | Type | Required | Description |
|---|---|---|---|
| mount | string | Required | Mount point path to disconnect |
curl -X GET "https://stream.example.com:8443/admin/killsource?mount=/stream" \ -u admin:password
Disconnect a specific listener from the server.
| Parameter | Type | Required | Description |
|---|---|---|---|
| mount | string | Required | Mount point path |
| id | integer | Required | Client connection ID |
curl -X GET "https://stream.example.com:8443/admin/killclient?mount=/stream&id=123" \ -u admin:password
Source Connection Protocol
Connect encoders to Mcaster1DNAS using ICY protocol
ICY Protocol v1.x
Legacy SHOUTcast-compatible protocol for encoder connections. Supported by most streaming encoders.
SOURCE /stream HTTP/1.0 Authorization: Basic [base64 encoded credentials] User-Agent: MyEncoder/1.0 Content-Type: audio/mpeg ice-name: My Radio Station ice-genre: Rock ice-url: https://example.com ice-public: 1 ice-bitrate: 128 ice-description: Best Rock Music 24/7
ICY Protocol v2.0+
Enhanced protocol with extended metadata support, social media integration, and advanced features.
SOURCE /stream HTTP/1.1 Authorization: Bearer [JWT token] User-Agent: MyEncoder/2.0 Content-Type: audio/mpeg ICY-Version: 2.1 ICY-Name: My Radio Station ICY-Genre: Rock ICY-URL: https://example.com ICY-Public: 1 ICY-Bitrate: 128 ICY-Social-Twitter: @mystation ICY-Social-Facebook: facebook.com/mystation ICY-Artwork-URL: https://example.com/artwork.jpg
Authentication Methods
Secure your server with multiple authentication options
Basic Authentication
Standard HTTP Basic Auth using username and password. Base64 encoded credentials sent with each request.
Authorization: Basic YWRtaW46cGFzc3dvcmQ=
JWT Token Authentication
JSON Web Tokens for secure, stateless authentication with configurable expiration and role-based access control.
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
IP Whitelist/Blacklist
Restrict access based on IP addresses. Configure allowed or denied IP ranges in your YAML configuration.
authentication:
ip_whitelist:
- 192.168.1.0/24
- 10.0.0.5
XSLT Transformations
Customize XML output with XSLT stylesheets
Mcaster1DNAS supports XSLT transformations for XML endpoints, allowing you to customize the output format for web pages, JSON conversion, or custom integrations.
paths: admin: /admin xsl: /web xsl_transforms: stats: /web/stats.xsl listclients: /web/listclients.xsl
Place custom XSLT files in the configured xsl directory to transform XML responses into HTML, JSON, or other formats.