I am using the Mavenlink API to create a project:
$response = $client->createWorkspace(array("title" => $project_number . ' ' . $company_name, "creator_role" => "maven"));
print_r($response);
$project_id = $response->id;
echo "project id: " . $project_id;
The part of creating the project is working fine, but I'm having trouble finding the correct path to "id". I want the ID so I can then use the update method to add more information to the project.
Heres a screenshot of the response output:
Raw response:
{"count":1,"workspaces":{"12220207":{"title":"34343 Add New","archived":false,"description":"","due_date":"","effective_due_date":"","start_date":"","budgeted":true,"change_orders_enabled":true,"updated_at":"2016-05-12T10:51:01-07:00","created_at":"2016-05-12T10:51:01-07:00","consultant_role_name":"FUEL","client_role_name":"Clients","percentage_complete":0,"access_level":"open","exclude_archived_stories_percent_complete":false,"can_create_line_items":true,"default_rate":"125.00","currency_symbol":"$","currency_base_unit":100,"can_invite":true,"has_budget_access":true,"tasks_default_non_billable":false,"rate_card_id":null,"workspace_invoice_preference_id":null,"posts_require_privacy_decision":false,"require_time_approvals":false,"require_expense_approvals":false,"stories_are_fixed_fee_by_default":false,"price":"TBD","price_in_cents":null,"budget_used":"$0","over_budget":false,"currency":"USD","expenses_in_burn_rate":true,"budget_used_in_cents":0,"total_expenses_in_cents":0,"status":{"color":"grey","message":"Not Started","key":130},"permissions":{"can_upload_files":true,"can_private_message":true,"can_join":false,"is_participant":true,"access_level":"admin","team_lead":true,"user_is_client":false},"creator_id":"10340340030","id":"12220207"}},"results":[{"key":"workspaces","id":"12220207"}]}
When I echo project_id, it is displaying blank. What is the correct path to target "id" ?
Thanks!