<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/create-project",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'filter' => '<string>',
'pathFilters' => [
[
'dataset' => '<string>',
'filter' => '<string>'
]
],
'projectId' => 123,
'newProjectName' => '<string>',
'projectApiKey' => '<string>',
'projectHmacKey' => '<string>',
'transformationBlockId' => 123,
'builtinTransformationBlock' => [
],
'outputDatasetName' => '<string>',
'outputDatasetBucketId' => 123,
'outputDatasetBucketPath' => '<string>',
'outputPathInDataset' => '<string>',
'label' => '<string>',
'emailRecipientUids' => [
123
],
'transformationParallel' => 123,
'extraCliArguments' => '<string>',
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}