<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brimble.io/core/v1/projects/{projectId}/redeploy",
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([
'healthCheckPath' => '<string>',
'authEnabled' => false,
'public' => true,
'deleteVolume' => true,
'http2' => true,
'buildHealthCheck' => true,
'preStartCommand' => '<string>',
'dockerfile' => '<string>',
'runtimeVersions' => [
'node' => '<string>',
'python' => '<string>',
'go' => '<string>',
'php' => '<string>',
'java' => '<string>',
'ruby' => '<string>',
'dotnet' => '<string>',
'deno' => '<string>',
'rust' => '<string>',
'elixir' => '<string>',
'erlang' => '<string>',
'gleam' => '<string>'
],
'watchPaths' => [
'<string>'
],
'configurations' => [
'cpu' => 123,
'memory' => 123,
'storage' => 123,
'region' => '<string>'
],
'diskSize' => 80,
'volumeId' => '<string>',
'mountPath' => '<string>',
'autoscalingGroup' => '<string>',
'cronEnabled' => true,
'cronExpression' => '<string>',
'cronTimezone' => '<string>',
'cronCommand' => '<string>',
'sendReport' => true,
'logId' => '<string>',
'buildCacheEnabled' => true,
'installCommand' => '<string>',
'buildCommand' => '<string>',
'startCommand' => '<string>',
'outputDirectory' => '<string>',
'rootDirectory' => '<string>',
'framework' => '<string>',
'repo' => [
'name' => '<string>',
'branch' => '<string>',
'id' => '<string>',
'installationId' => '<string>'
],
'name' => '<string>',
'startOnly' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-brimble-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}