PHP
$data = array (
'Collections' =>
array (
),
'CaseType' => 'string',
'CameraGroupUid' => 'string',
'Source.Uid' => 'void',
'Source' =>
array (
'Uid' => 'string',
'Url' => 'string',
),
'Source.Url' => 'void',
'Pipeline.Detector.ScoreThreshold' => 'void',
'Pipeline' =>
array (
'Detector' =>
array (
'ScoreThreshold' => 0.0,
),
'Fences' =>
array (
),
'Areas' =>
array (
),
),
'Pipeline.Fences' => 'void',
'Pipeline.Areas' => 'void',
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'PUT',
'header' => "Content-Type: application/json\r
Accept: application/json",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domain/api/streams/{stream-uid}/?format=json?stream=<stream>', false, $context);