Get Stream Statistics
Returns the details of a pull stream statistics
curl -X GET "https://api.5centscdn.com/v2/streams/restream/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/restream/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/restream/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/restream/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/restream/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": "logotest/james",
"status": "Alive",
"bitrate": "1127.27kbps",
"primary": true,
"time": "20573d 12:15:59",
"publish_time": "34 minutes ago",
"publisher_ip": "",
"video": {
"size": "1280x720",
"bitrate": "958.18kbps",
"codec": "avc1.4d401f",
"profile": "-",
"level": "-"
},
"audio": {
"codec": "mp4a.40.2",
"bitrate": "169.09kbps"
}
},
"platform": [
{
"id": 46770,
"time": 0,
"bitrate": "",
"fps": "",
"cpu": "",
"mem": "",
"log": "[rtmp @ 0x55ffb7e17700] Server error: Play failed.
rtmp://el01-5-normal.cdnized.com/logotest/james: Operation not permitted
",
"node": "fs-fr-rbx-ovh02"
}
],
"status": "Enabled",
"lastseen": "47 seconds ago"
},
"transcode": {
"fst": {
"name": "logotest/james.stream",
"node": "",
"status": "Dead",
"bitrate": "kbps",
"fps": "",
"time": "",
"cpu": "",
"mem": "",
"speed": "",
"log": "",
"video": [],
"audio": []
}
}
}
/streams/restream/{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.
Restream platform configuration object.
Unique numeric identifier.
Total uptime duration of the stream session.
Current bitrate of the stream.
Target frames per second for the output.
Memory usage statistic.
Log data or log reference.
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.