Action | Endpoint |
---|---|
Authentication | player_api.php?username=X&password=X |
GET Live Stream Categories | player_api.php?username=X&password=X&action=get_live_categories |
GET VOD Stream Categories | player_api.php?username=X&password=X&action=get_vod_categories |
GET SERIES Categories | player_api.php?username=X&password=X&action=get_series_categories |
GET LIVE Streams |
player_api.php?username=X&password=X&action=get_live_streams (All LIVE Streams)player_api.php?username=X&password=X&action=get_live_streams&category_id=X (Category specific)
|
GET VOD Streams |
player_api.php?username=X&password=X&action=get_vod_streams (All VOD Streams)player_api.php?username=X&password=X&action=get_vod_streams&category_id=X (Category specific)
|
GET SERIES Streams |
player_api.php?username=X&password=X&action=get_series (All Series)player_api.php?username=X&password=X&action=get_series&category_id=X (Category specific)
|
GET SERIES Info | player_api.php?username=X&password=X&action=get_series_info&series_id=X |
GET VOD Info | player_api.php?username=X&password=X&action=get_vod_info&vod_id=X |
GET short_epg for LIVE Streams |
player_api.php?username=X&password=X&action=get_short_epg&stream_id=X player_api.php?username=X&password=X&action=get_short_epg&stream_id=X&limit=X
|
GET ALL EPG for LIVE Streams | player_api.php?username=X&password=X&action=get_simple_data_table&stream_id=X |
Full EPG List for all Streams | xmltv.php?username=X&password=X |
Perform this request to view all your servers, main & load balancers including their status.
http://your_dns:port/api.php?action=server&sub=list
curl "http://127.0.0.1:80/api.php?action=server&sub=list"
Perform this request to view only the online Live Streams.
http://your_dns:port/api.php?action=stream&sub=online
curl "http://127.0.0.1:80/api.php?action=stream&sub=online"
Perform this request to view only the Offline Live Streams.
http://your_dns:port/api.php?action=server&sub=offline
curl "http://127.0.0.1:80/api.php?action=server&sub=offline"
Perform this request to start or restart a Live Stream. The last argument is an array in which you can specify the stream ids. It works with POST method as well.
http://your_dns:port/api.php?action=stream&sub=start&stream_ids[]=1
curl "http://127.0.0.1:80/api.php?action=stream&sub=start&stream_ids[]=51"
Perform this request to stop a Live Stream. The last argument is an array in which you can specify the stream ids. It works with POST method as well.
http://your_dns:port/api.php?action=stream&sub=stop&stream_ids[]=1
curl "http://127.0.0.1:80/pi.php?action=stream&sub=stop&stream_ids[]=557"
Perform this request to start a VOD Encoding process. The last argument is an array in which you can specify the stream ids. It works with POST method as well. Applies for series episodes as well.
http://your_dns:port/api.php?action=vod&sub=start&stream_ids[]=1
curl "http://127.0.0.1:80/api.php?action=vod&sub=start&stream_ids[]=554"
Perform this request to stop a VOD Encoding. The last argument is an array in which you can specify the stream ids. It works with POST method as well.
http://your_dns:port/api.php?action=vod=stop&stream_ids[]=1
To create a Newline, call the following URL with POST method and specify arguments in an array called user_data.
http://dns:port/api.php?action=user&sub=create
Parameter | Description |
---|---|
username |
Username for the new line (optional - if empty, system will generate random username) |
password |
Password for the new line (optional - if empty, system will generate random password) |
max_connections |
Maximum connections allowed (optional) |
is_restreamer |
Whether the user is a restreamer (optional) |
exp_date |
Expiration date for the line (optional) |
bouquet |
JSON encoded array of bouquet IDs (optional) |
$post_data = array(
'username' => 'testuser',
'password' => 'testpass',
'max_connections' => 3,
'is_restreamer' => 0,
'exp_date' => '2023-12-31',
'bouquet' => json_encode([1, 2, 3])
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($opts);
$api_result = json_decode(file_get_contents($panel_url . "api.php?action=user&sub=create", false, $context));
{
"result": true,
"created_id": 14838,
"username": "d4PSc5uCqF",
"password": "2ZiuRRZk4b"
}
{"result": false, "error": "EXISTS"}
{"result": false, "error": "PARAMETER ERROR"}
Edit an existing user line with the following endpoint.
http://dns:port/api.php?action=user&sub=edit
username
- Existing usernamepassword
- Existing passwordmax_connections
is_restreamer
exp_date
bouquet
member_id
admin_enabled
enabled
allowed_ips
allowed_ua
force_server_id
is_isplock
admin_notes
$post_data = array(
'username' => 'testuser',
'password' => 'testpass',
'user_data' => array(
'max_connections' => 5,
'is_restreamer' => 1,
'exp_date' => '2024-12-31'
)
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($opts);
$api_result = json_decode(file_get_contents($panel_url . "api.php?action=user&sub=edit", false, $context));
{"result": true}
{"result": false, "error": "NOT EXISTS"}
{"result": false, "error": "PARAMETER ERROR"}
{"result": false, "error": "PARAMETER ERROR (user/pass)"}
Get all information about a user line including active connections.
http://dns:port/api.php?action=user&sub=info
username
password
$post_data = array(
'username' => 'testuser',
'password' => 'testpass'
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($opts);
$api_result = json_decode(file_get_contents($panel_url . "api.php?action=user&sub=info", false, $context), true);
if ($api_result['result']) {
echo "Active Connections (Now): " . $api_result['user_info']['active_cons'];
echo "\nCurrent Expire Date: " . ((empty($api_result['user_info']['exp_date'])) ? 'Unlimited' : strtotime($api_result['user_info']['exp_date']));
echo "\nMax Connections: " . $api_result['user_info']['max_connections'];
echo "\nAvailable Channel IDs: " . implode(',', $api_result['user_info']['channel_ids']);
} else {
echo 'FAILED';
}
Create a new MAG device with the following endpoint.
http://dns:port/api.php?action=stb&sub=create
mac
- MAC address of the deviceexp_date
- Expiration datebouquet
- JSON encoded array of bouquet IDs$post_data = array(
'user_data' => array(
'mac' => '00:1A:79:XX:XX:XX',
'exp_date' => '2023-12-31',
'bouquet' => json_encode([1, 2, 3])
)
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($opts);
$api_result = json_decode(file_get_contents($panel_url . "api.php?action=stb&sub=create", false, $context));
print_r($api_result);
{"result": true}
{"result": false, "error": "EXISTS"}
{"result": false, "error": "PARAMETER ERROR"}
{"result": false, "error": "PARAMETER ERROR (mac)"}
Edit an existing MAG device with the following endpoint.
http://dns:port/api.php?action=stb&sub=edit
mac
- MAC address of the deviceexp_date
bouquet
$post_data = array(
'mac' => '00:1A:79:XX:XX:XX',
'user_data' => array(
'exp_date' => '2024-12-31',
'bouquet' => json_encode([1, 2, 3, 4])
)
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($opts);
$api_result = json_decode(file_get_contents($panel_url . "api.php?action=stb&sub=edit", false, $context));
{"result": true}
{"result": false}
{"result": false, "error": "PARAMETER ERROR"}
{"result": false, "error": "PARAMETER ERROR (mac)"}
Get all information about a MAG device.
http://dns:port/api.php?action=stb&sub=info
mac
- MAC address of the device$post_data = array(
'mac' => '00:1A:79:XX:XX:XX'
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($opts);
$api_result = json_decode(file_get_contents($panel_url . "api.php?action=stb&sub=info", false, $context), true);
if ($api_result['result']) {
echo "Active Connections (Now): " . $api_result['user_info']['active_cons'];
echo "\nCurrent Expire Date: " . ((empty($api_result['user_info']['exp_date'])) ? 'Unlimited' : strtotime($api_result['user_info']['exp_date']));
echo "\nMax Connections: " . $api_result['user_info']['max_connections'];
echo "\nAvailable Channel IDs: " . implode(',', $api_result['user_info']['channel_ids']);
} else {
echo 'FAILED';
}