Hi guys, I got it working a few days later but I neglected to put an update here… I was basically just excluding some info, which I found later from the following link:
https://www.wowza.com/docs/smil-files-query-examples
I’ve included an excerpt of my PHP code below:
##### Adding the smil file
$url = "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/smilfiles/apiTest";
$target = array(
"restURI" => "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/smilfiles/apiTest",
"title" => "apiTest",
"smilStreams" => [ array(
"src" => "apiTest.stream",
"type" => "video",
"systemLanguage" => "en",
"videoBitrate" => "1000000",
"audioBitrate" => "160000",
"restURI" => "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/smilfiles/apiTest"
)]);
#var_dump($target["enabled"]);
$json = json_encode($target);
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $json,
CURLOPT_HEADER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_USERPWD => "admin:admin",
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept:application/json; charset=utf-8',
'Content-type:application/json; charset=utf-8',
'Content-Length: '.strlen($json)));
$contents = curl_exec($ch);
curl_close($ch);
$ch = curl_init();
$obj = json_decode($contents);
print_r($obj);