LiquidPlanner Classic Forum
Filtering - specifically Time Filters
*Posted on behalf of Tim Stewart. Original posting date 2016-09-13.*
I am looking to pull all timesheets data and all timesheet entries for specific members
However I have data going back to 2012 on this workspace so I have been trying to limit this to Year to Date.
For Timesheet entries if I tested with Month To Date - setting the start but not specifying an end_date:
```https://app.liquidplanner.com/api/workspaces/[my id]/timesheet_entries?start_date=2016-09-01T00:00:00Z```
This works - restricting me to a much more reasonable 76 records
If I try to bring back timesheets to the same limitation
```https://app.liquidplanner.com/api/workspaces/[my id]/timesheets?start_date=2016-09-01T00:00:00Z```
I get an error
If I use starts= (as that is a field within timesheets) I get all results - the API is ignoring an incorrect filter and processing all records
So I try the normal date filter using the starts and ends fields
```https://app.liquidplanner.com/api/workspaces/[my id]/timesheets?starts=2016-09-01&ends=2016-09-16```
Doesn't work - all records returned
Similar story if I want to limit records for custom_field etc.
Do I need to use a different field reference or operator depending on the API type I am querying?
Do only some Types support the Start but No End format?
Do I need to use the filter[] format?
If so do I use the starts [date value] ends today?
Could you provide an example for the since or before, today operators in a date filter or some clearer explanation of which scenarios these can be used
If I drill in to expand the records I want theres a LOT of rows coming back but the documentation on filtering and these inconsistencies are driving me in circles. I've read all the forum posts, knowledgebase and API guide on this and the information is partial or confusing
Similarly the member filter I am trying to use is not working (returning all records)
Whilst this is much smaller I would like to limit the list to just two members on one report
```https://app.liquidplanner.com/api/workspaces/62403/members?filter[]=user_name=:(user_name-1)&filter[]=user_name=:(user_name-2)```
Posted by LiquidPlanner Support over 4 years ago
Track_time gives 404 when "work" value is set
*Posted on behalf of Pat Daly. Original posting date 2016-09-10.*
I'm trying to use track_time to add and estimate and log hours against a task.
I can successfully add the low and high remaining estimate values. However when I add "work" property I get a 404
Sample URIs
This works fine
```
https://app.liquidplanner.com/api/workspaces/###/tasks/###/track_time {person_id:###,low:9.0,high:9.0}
```
This fails
```
https://app.liquidplanner.com/api/workspaces/###/tasks/###/track_time {person_id:###,work:1.0,low:9.0,high:9.0}
```
Posted by LiquidPlanner Support over 4 years ago
What wordspace are tags in?
*Posted on behalf of Jared Fedorchuk. Original posting date 2016-09-01.*
Hello. We are starting to add tags to some of our projects, but when I dump all the information I get from the projects workspace I don't see any tags there. Where can I find these through the API?
Posted by LiquidPlanner Support over 4 years ago
Start & Stop Timer for an Activity via API
*Posted on behalf of Lee Raybone. Original posting date 2016-08-23.*
Is it possible to control a timer for a task and an particular activity on that task via the API?
Regards,
Lee
Posted by LiquidPlanner Support over 4 years ago
Updating Field for Projects c#
*Posted on behalf of Alexm. Original posting date 2016-07-18.*
Hi,
I am trying to update the field "external_referance" on existing projects.
The method that i use to do this is:
```
public Project UpdateProjectWithExternalReference(Project project)
```
```
{
uRLBuilder.Append("/workspaces/");
uRLBuilder.Append(workspaceId);
uRLBuilder.Append("/projects/");
uRLBuilder.Append(project.id);
uRLBuilder.Append("/update_external_reference");
return GetObject<Project>(put(uRLBuilder.ToString(), new {project = project }));c
When i run this code i get a 404 error;
I have also tried:
```
public Project UpdateProjectWithExternalReference(Project project)
```
```
{
uRLBuilder.Append("/workspaces/");
uRLBuilder.Append(workspaceId);
uRLBuilder.Append("/projects/");
uRLBuilder.Append(project.id);
uRLBuilder.Append("/update_external_reference");
return GetObject<Project>(put(uRLBuilder.ToString(), new {external_reference = project.external_reference }));
}
```
and i get the same 404 (the remote server returned an error) message.
And finally i have tried:
```
public Project UpdateProjectWithExternalReference(Project project)
```
```
{
uRLBuilder.Append("/workspaces/");
uRLBuilder.Append(workspaceId);
uRLBuilder.Append("/projects/");
uRLBuilder.Append(project.id);
return GetObject<Project>(put(uRLBuilder.ToString(), new {external_reference = project.external_reference }));
}
```
and
```
public Project UpdateProjectWithExternalReference(Project project)
```
```
{
uRLBuilder.Append("/workspaces/");
uRLBuilder.Append(workspaceId);
uRLBuilder.Append("/projects/");
uRLBuilder.Append(project.id);
return GetObject<Project>(put(uRLBuilder.ToString(), new {project = project}));
}
```
Both of these return 400 Bad request errors.
I would also like to mention that the GetObject<t>() and put() methods are exactly as they are in the example hyperlinked above.
Any assistance would be appreciated.
Thanks
Posted by LiquidPlanner Support over 4 years ago
API database table structure
*Posted on behalf of a customer. Original posting date 2014-07-27*
I happened to look back at the database table structure in the api help:
https://app.liquidplanner.com/api/help ... and I noticed that in the
Activity Table there is no field called activity_id ?
This doesn't make sense .. how can the database tables join in the correct
way to in order to display Activity.name if there is no field called
Activity.activity_id ?
Posted by LiquidPlanner Support over 4 years ago
Phone push notifications using webhooks
*Posted on behalf of customer. Original posting date 2014-07-21*
How can I get comments made on a task or project to send a push notification to my phone?
We'd like to use the comments over tasks as "in context" drippy communication.
It's only valuable with a mobile push notification.
I read the Webhooks post and I was not clear how to set it up. It feels like something that might be a base feature/option.
Thank you!
Posted by LiquidPlanner Support over 4 years ago
Webhook setup to engage an API when a project is modified
*Posted on behalf of a customer. Original post 2014-07-05*
I have a webhook setup to engage an API when a project is modified. When I mark it as done, for some reason my JSON object is showing the done value as “False”
'{ "work": 0.0, "alerts": [], "client_id": null, "client_name": null, "created_at": "2014-07-14T11:25:56-05:00", "created_by": 377107, "custom_field_values": { "Product": "Systems Integration" }, "done_on": "2014-07-15", "started_on": "2014-07-14", "delay_until": null, "parent_delay_until": null, "description": "", "earliest_finish": null, "earliest_start": null, "expected_finish": null, "expected_start": null, "p98_finish": null, "global_priority": [ 1, 2307 ], "has_note": false, "high_effort_remaining": 0.0, "is_done": true, "is_on_hold": false, "latest_finish": null, "low_effort_remaining": 0.0, "manual_alert": "", "max_effort": null, "contract_value": null, "name": "ZDIntegrationTest", "owner_id": 275414, "parent_id": 7918694, "parent_ids": [ 7918694 ], "parent_crumbs": [], "promise_by": null, "parent_promise_by": null, "external_reference": null, "updated_at": "2014-07-15T16:59:07-05:00", "updated_by": 275414, "type": "Project", "id": 16094875, "change_type": "update", "changes": { "is_done": false } }'
I had this working at one point, and now it’s not working anymore. Is there something that I need to look at? I combed the API documentation and I think I’m doing everything correctly, but I’m not sure.
Posted by LiquidPlanner Support over 4 years ago
Help with change triggering a webhook
*Posted on behalf of Christian G. Warden. Original post 2014-07-15*
I'm experimenting with webhooks, and I'm trying to trigger an action
when a custom field changes on a task. The change is triggering the
webhook, and I'm getting the new value in the "custom_field_values"
attribute of the JSON that's POSTed, but the "changes" attribute
contains an empty object.
I also noticed that logging time against a task triggered the webhook
with the new "work" value, but the "changes" object was empty in this
case too.
Is this the expected behavior?
Posted by LiquidPlanner Support over 4 years ago
Get Notes via API
*Posted on behalf of William. Original post date 2014-07-14*
I am having some serious trouble getting notes from tasks via the API. I'm using nearly every other task GET call and they are all executing just fine. Not sure what I'm doing wrong with the notes, but I continually receive the message:
error: "NotFound", message: "Record not found (or you don't have permission to access it).", type: "Error"
I know for a fact that the task includes a note, both via the LP site and my tasks API call as the property has_note = 1. Also, if I visit the page directly in my browser while logged in, I see the note. I just can't get it to come through in json. Any idea what I'm doing wrong here?
Posted by LiquidPlanner Support over 4 years ago