LiquidPlanner Classic Forum
FIltering Member Query
*Posted on behalf of Bob Puckett. Original posting date 2017-04-06.*
In my application, I need to get a list of members assigned to a specific team.
Currently, I use C# code that looks like this:
```
String url = $"/workspaces/{WorkspaceId}/members";
var results = GetObject<List<LpMember>>(get(url));
return results;
```
This call takes about 20 seconds to return. We have a lot of members. Since I only need the 10 members or so from a specific team, it would be great if there was a way to filter to a team.
I tried this initially, but it looked like you can't filter on the members URl.
Posted by LiquidPlanner Support over 4 years ago
Pulling data into Excel that cannot be created in Analytics report
*Posted on behalf of Bryan deSilva. Original posting date 2017-03-24*
So with Nadia's help I am now able to pull my Analytics report data into Excel. Cool. But that only shows the current month that the report can handle. I want all my data for each month coming over. In the analytics report I cannot choose to show all my data except already totaled. I need the pay$ and billable$ BY month for many months. Suggestions?
Posted by LiquidPlanner Support over 4 years ago
Excel extracted API data doesn't seem to be numbers
*Posted on behalf of Bryan deSilva. Original posting date 2017-03-23.*
I cannot use a pivot table. Everything is zero. Even if I format it manually. What's up with this? I'm using query in Excel using the API address as instructed in the API guide. The data comes, but isn't usable. What might I be doing wrong? I can manually add two numbers (=A1+B1), but I cannot =SUM(....) nor create a pivot table. Just zeros.
Posted by LiquidPlanner Support over 4 years ago
how to use API token to authenticate
*Posted on behalf of Daniel Holly. Original posting date 2017-03-18.*
Does anyone have an example of how to authenticate with an API token?
Thanks!
Posted by LiquidPlanner Support over 4 years ago
Member Expected Finish Date API
*Posted on behalf of Lee Raybone. Original posting date 2017-03-01.*
Is it possible to request or find the expected finish date for a member based on all the tasks they are assigned to, using the API?
Posted by LiquidPlanner Support over 4 years ago
Update Task Description - task_update
*Posted on behalf of a customer. Original posting date 2017-01-12.*
What is the correct URL and JSON format?
Here is my code, and don't worry about the $super_user_lp, it is working. Only the task_update is not working, and has no response by thisAPI call.
```
$response_update_task_prefix = $super_user_lp->task_update($task_id, $update_data);
/*
$update_data['name'] = "Prefix"."Original Task Name";
$update_data['description'] = "Prefix"."Original Description";
//By the way, may I update the Note like this:?
$update_data['note'] = "New Note"."Original Note";
*/
```
```
function task_update($taskid, $data){
$encodedTask = json_encode(array('task' => $data));
$url = 'https://app.liquidplanner.com/api/workspaces/{space ID}/tasks/'.$taskid;
$response = $this->lp_put($url, $encodedTask);
return($response);
}
```
```
function lp_put($endpoint_url, $encodedTask){
$curl = curl_init($endpoint_url);
curl_setopt($curl, CURLOPT_HEADER, false); //$conn
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERPWD, trim($this->email).":".trim($this->password));
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
```
```
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_URL, $endpoint_url);
// curl_setopt($curl, CURLOPT_POSTFIELDS, $encodedTask);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($encodedTask));
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec( $curl );
$error = curl_error($curl);
// curl_close($curl);
```
```
$results = json_decode($response, true);
return $results;
}
```
Posted by LiquidPlanner Support over 4 years ago
Filter Timesheet entires based on created_at and updated_at Rest Api
*Posted on behalf of Shubham Sharma. Original posting date 2016-12-27*
Hello,
I am new to this platform. I wanted to get the time sheet entries created on a particular day via Rest API.
I have gone through the Liquid Planner API guide. But i am unable to find any solution how to achieve that.
Maybe like we can filter time sheet entries on created_at and updated_at filters.
For example :
```
/api/workspaces/[workspace Id]/timesheet_entries?created_at=[today date]
/api/workspaces/[workspace Id]/timesheet_entries?updated_at=[today date]
```
Posted by LiquidPlanner Support over 4 years ago
What's the difference between `package_after/before` and `move_after/before`?
*Posted on behalf of Ryan Rembert. Original posting date 2016-12-09.*
I want to have a task from a lower priority package referenced in a higher priority package. The task is nested in the lower prio package like this: Package > Project > Task. Higher prio package is nested like this: Package > Task.
Both of these requests seem to accomplish the same thing:
```
POST /workspace/{workspace_id}/tasks/{task_id}/move_after?owner_id={higher_pkg_id}
```
```
POST /workspace/{workspace_id}/tasks/{task_id}/package_after?owner_id={higher_pkg_id}
```
If there is a difference between the two, when and how should they be used?
Posted by LiquidPlanner Support over 4 years ago
How to get upload file path? PHP
*Posted on behalf of Feng. Original posting date 2016-12-09.*
Here is the code. And the question is how to get the correct $file_path? The file supposed to be located on the local folder. Thanks!
```
$attachment_filename = "test.jpg";
$file_path = "@$attachment_filename";
```
OR something like this:
```
$attachment_filename= $_FILES['userfile']['name'] ;
$tmp_name = $_FILES['userfile']['tmp_name'];
$dest_dir = 'upLoad';
$file_path = $dest_dir.'/'.$attachment_filename;
```
...
OR
.... your suggestion code
```
//----------------------------------------------
$upload_file_response = $lp->attachDocument($file_path,$attachment_filename, $task_id);
```
```
function attachDocument($file_path,$filename, $taskid) {
```
```
$Data = array('document[attached_file]' => $file_path, 'document[file_name]'=> $filename);
```
```
$url = $this->serviceurl . '/tasks/' . $taskid . '/documents';
$response = $this->lp_attach_file($url, $Data);
return($response);
}
```
```
function lp_attach_file($endpoint_url, $Data) {
```
```
$curl = curl_init($endpoint_url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERPWD, trim($this->email).":".trim($this->password));
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: multipart/form-data"));
curl_setopt($curl, CURLOPT_ENCODING, ""); // Prevent GZIP compression of response from LP
```
```
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_URL, $endpoint_url);
curl_setopt($curl, CURLOPT_POSTFIELDS, $Data);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // Accept any SSL certificate
$response = curl_exec($curl);
$error = curl_error($curl);
```
```
$results = json_decode($response, true);
```
```
return $results;
}
```
Posted by LiquidPlanner Support over 4 years ago
Get project members.
*Posted on behalf of Jared Fedorchuk. Original posting date 2016-10-06.*
Through the api how do we get the members for a specific project?
Posted by LiquidPlanner Support over 4 years ago