Update Platform
Update the platform of a push stream
curl -X POST "https://api.5centscdn.com/v2/streams/push/1001/platform/1" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[vprofiles]": 0,
"platform[aprofiles]": 0,
"platform[schedule]": "instant",
"platform[scheduleontime]": "",
"platform[scheduleondatetime]": "",
"platform[provider_id]": 0,
"platform[video_id]": ""
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/push/1001/platform/1"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[vprofiles]": 0,
"platform[aprofiles]": 0,
"platform[schedule]": "instant",
"platform[scheduleontime]": "",
"platform[scheduleondatetime]": "",
"platform[provider_id]": 0,
"platform[video_id]": ""
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/push/1001/platform/1", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[vprofiles]": 0,
"platform[aprofiles]": 0,
"platform[schedule]": "instant",
"platform[scheduleontime]": "",
"platform[scheduleondatetime]": "",
"platform[provider_id]": 0,
"platform[video_id]": ""
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[vprofiles]": 0,
"platform[aprofiles]": 0,
"platform[schedule]": "instant",
"platform[scheduleontime]": "",
"platform[scheduleondatetime]": "",
"platform[provider_id]": 0,
"platform[video_id]": ""
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/push/1001/platform/1", bytes.NewBuffer(data))
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/push/1001/platform/1')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[vprofiles]": 0,
"platform[aprofiles]": 0,
"platform[schedule]": "instant",
"platform[scheduleontime]": "",
"platform[scheduleondatetime]": "",
"platform[provider_id]": 0,
"platform[video_id]": ""
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Platform Updated",
"warnings": [],
"errors": []
}
/streams/push/{streamid}/platform/{platformid}Target server for requests. Edit to use your own host.
API key (sent in header)
Stream ID
Platform ID
The media type of the request body
The name of the platform. Examples include Custom RTMP or YouTube.
The RTMP URL used to establish a connection for streaming live video.
The key or password used for authentication on the platform.
Indicates whether authentication is required. Y means yes, N means no.
The username used for platform authentication, required when auth is Y.
The password used with the username for platform authentication.
The number of video profiles associated with the platform for video quality or encoding.
The number of audio profiles associated with the platform for audio quality or encoding.
The scheduling type for the platform stream. Values include instant or scheduled.
The scheduled time for the stream. Empty if schedule is instant.
The scheduled date and time for the stream. Empty if schedule is instant.
Identifies the provider associated with the platform. 0 means no provider specified.
The ID of the video associated with the platform. Empty if no video is linked.
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
Body
The name of the platform. Examples include Custom RTMP or YouTube.
Custom RTMPThe RTMP URL used to establish a connection for streaming live video.
rtmp://rtmp.5centscdn.com:1935/The username used for platform authentication, required when auth is Y.
adminThe password used with the username for platform authentication.
passwordThe number of video profiles associated with the platform for video quality or encoding.
0The number of audio profiles associated with the platform for audio quality or encoding.
0The scheduling type for the platform stream. Values include instant or scheduled.
instantThe scheduled time for the stream. Empty if schedule is instant.
The scheduled date and time for the stream. Empty if schedule is instant.
Identifies the provider associated with the platform. 0 means no provider specified.
0The ID of the video associated with the platform. Empty if no video is linked.
Responses
Status of the API response.
Human-readable message describing the result.
Non-fatal warnings returned with the response.
Errors returned with the response.