LiquidPlanner Classic Forum
Need sample CURL code to create a project
over 5 years ago by LiquidPlanner Support
Posted on behalf of gemberlingb. Original posting date 2013-12-11
I can do the following Curl statement in PHP and list all projects in my workspace. I would like to see an example of a PHP Curl statement like this that will create a project.
$url = "https://app.liquidplanner.com/api/workspaces/XXXXX/projects";
$conn = curl_init();
curl_setopt($conn, CURLOPT_HEADER, 0);
curl_setopt($conn, CURLOPT_HTTPHEADER, array("Content-type: multipart/form-data"));
curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($conn, CURLOPT_ENCODING, "");
curl_setopt($conn, CURLOPT_USERPWD, $_SESSION['email'] . ":" . $_SESSION['pwd']);
curl_setopt($conn, CURLOPT_URL, $url);
curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, 0);
$response = curl_exec($conn);
curl_close($conn);
print_r($response);