Get Stream Statistics
Return details of the stream statistics
curl -X GET "https://api.5centscdn.com/v2/streams/scheduledplaylist/1001/statistics" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY"
import requests
import json
url = "https://api.5centscdn.com/v2/streams/scheduledplaylist/1001/statistics"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/scheduledplaylist/1001/statistics", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.5centscdn.com/v2/streams/scheduledplaylist/1001/statistics", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/streams/scheduledplaylist/1001/statistics')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"0": {
"fs": {
"name": "live/103_push_6643_001one",
"status": "Alive",
"bitrate": "1197.25kbps",
"primary": true,
"time": "20578d 15:06:13",
"publish_time": "19 hours ago",
"publisher_ip": "",
"video": {
"size": "1086x720",
"bitrate": "1017.66kbps",
"codec": "avc1.64002a",
"profile": "-",
"level": "-"
},
"audio": {
"codec": "mp4a.40.2",
"bitrate": "179.59kbps"
}
},
"status": "Enabled",
"lastseen": "2 seconds ago"
},
"transcode": {
"fst": {
"name": "103_push_6643_001/fb9a2ddb20c20ddee56f8ad668a70485.sdp",
"node": "",
"status": "Dead",
"bitrate": "kbps",
"fps": "",
"time": "",
"cpu": "",
"mem": "",
"speed": "",
"log": "",
"video": [],
"audio": []
}
}
}
/streams/scheduledplaylist/{streamid}/statisticsTarget server for requests. Edit to use your own host.
API key (sent in header)
Stream ID
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Responses
Live ingest stream statistics from the media server.
Name of the stream.
Current deployment or operational status of the stream.
Current bitrate of the stream.
Whether this is the primary ingest connection.
Total uptime duration of the stream session.
Elapsed time since publishing started.
IP address of the stream publisher.
Video track statistics.
Video resolution in WxH format.
Current bitrate of the stream.
Video codec used for the stream.
Video codec profile name.
Video codec level value.
Audio track statistics.
Video codec used for the stream.
Current bitrate of the stream.
Current deployment or operational status of the stream.
Elapsed time since the stream was last detected as active.
Live transcoding configuration for the stream.
Name of the stream.
Current deployment or operational status of the stream.
Current bitrate of the stream.
Target frames per second for the output.
Total uptime duration of the stream session.
Memory usage statistic.
Transfer speed statistic.
Log data or log reference.
Video track statistics.
Audio track statistics.