LiquidPlanner Classic Forum
CRUD webhooks via the API?
*Posted on behalf of a customer. Original posting date 2015-03-13.*
Is it possible to create/update the webhooks via the API? I know I can get a list of webhooks, but say I wanted to enable or disable them, is that possible?
Posted by LiquidPlanner Support over 4 years ago
How can I post comment as HTML content ?
*Posted on behalf of a customer. Original posting date 2015-03-11*
I want to write the following comment into the LP from the rest API post function, in my case comment is creating but formatting is breaking. I want to write exact same formatted way. Please help me how can maintain format of the comment ?
original format of comment:
E-mail content (first draft, eager to do some changes, improvements etc.):
Invitation e-mail, send to someone who was added by manager or HR admin:
/e-mail_name/
Invitation to [App_name]
/e-mail_text/
Hi [user_first_name]!
Please click link below to register in [App_name]:
<link>[http_address]</link>
[App_name] allows you to check and book your vacation days quick and easily.
Best regards,
[App_name] Team
Example:
Invitation to Vacation App
Hi Adrian!
Please click link below to register in Vacation App:
https://vacation.forlagshuset.no/register?adsafskjhfasdf
Vacation app alows you to check and book your vacation days quick and easily.
Best regards,
Vacation App Team
E-mail send to the manager when user book vacations:
/e-mail_name/
Vacation request - [user_first_name;user_last_name]
/e-mail_text/
[user_first_name;user_last_name] booked [vacation_type] in: [start_date]-[end_date].
/if vacation type has limit/
He still has [day_number] [vacation_type] days left. If you accept this request, it will be limited to [day number] days.
/if there are comments/
Comments:
[user],[date]: [comment]
[user],[date]: [comment]
[user],[date]: [comment]
<link> ACCEPT REQUEST </link>
<link> REFUSE REQUEST </link>
<link> add comment </link>
<link>Go to [app_name]</link>
Example:
Vacation request - Adrian X
Adrian X booked paid vacation: 23.08.2014 - 28.08.2014
He still has 17 paid vacation days left. If you accept this request, it will be limited to 14 days.
When i am writing comment in the LP then the format become as following which i don't want.
E-mail content (first draft, eager to do some changes, improvements etc.): Invitation e-mail, send to someone who was added by manager or HR admin: /e-mail_name/ Invitation to [App_name] /e-mail_text/ Hi [user_first_name]! Please click link below to register in [App_name]: <link>[http_address] [App_name] allows you to check and book your vacation days quick and easily. Best regards, [App_name] Team Example: Invitation to Vacation App Hi Adrian! Please click link below to register in Vacation App: https://vacation.forlagshuset.no/register?adsafskjhfasdf Vacation app alows you to check and book your vacation days quick and easily. Best regards, Vacation App Team E-mail send to the manager when user book vacations: /e-mail_name/ Vacation request - [user_first_name;user_last_name] /e-mail_text/ [user_first_name;user_last_name] booked [vacation_type] in: [start_date]-[end_date]. /if vacation type has limit/ He still has [day_number] [vacation_type] days left. If you accept this request, it will be limited to [day number] days. /if there are comments/ Comments: [user],[date]: [comment] [user],[date]: [comment] [user],[date]: [comment] <link> ACCEPT REQUEST <link> REFUSE REQUEST <link> add comment <link>Go to [app_name] Example: Vacation request - Adrian X Adrian X booked paid vacation: 23.08.2014 - 28.08.2014 He still has 17 paid vacation days left. If you accept this request, it will be limited to 14 days.
Manually i am copy pasting the comment then the comment is writing as same as i want. But from REST api its breaking expectation. I have posted question at stackoverflow also, see the link below.
http://stackoverflow.com/questions/28963403/how-to-serialize-a-long-string-and-maintain-the-formatting?noredirect=1#comment46180125_28963403
Posted by LiquidPlanner Support over 4 years ago
API snapshot data
*Posted on behalf of a customer. Original posting date 2015-03-03.*
I'm browsing the API documentation trying to figure out if there's a way to get custom field values as of a particular snapshot date. I see that there are snapshot ids, but when I specify include=snapshots in a request, I don't get the custom fields on each individual snapshot. Is there any way to get this information from the API?
Posted by LiquidPlanner Support over 4 years ago
How do I access Internal vs Billable hours logged in my C# program.
*Posted on behalf of Hank Thomas. Original posting date 2015-03-03.*
I have a nice WebApp that Displays open timesheets for users after they login. Now, I need to break out the Internal hours from billable. Ideas?
Thanks,
Hank
Posted by LiquidPlanner Support over 4 years ago
Update assignment of project
*Posted on behalf of a customer. Original posting date 2015-03-02.*
I’m trying to update the owner of a project through the assignments and the documentation says I should use update_assignment, but I’m getting a 404 error when I do so. There’s something wrong with my code but I don’t see what it is.
```
// Create new project
Item aProject = liquidplanner.CreateProject(new Item()
{
name = “project name”,
description = “description”
};);
Item aAssign = liquidplanner.UpdateProjectAssignment(aProject,new Item()
{
person_id = XXXXXX // This is the person I want to be the new owner
};);
```
Here are the methods (copied from the sample code in your help section)
```
// Project Methods
public Item CreateProject(LpObject data)
{
return GetObject<Item>(post("/workspaces/" + this.WorkspaceId + "/projects", new
{
project = data
}));
}
public Item UpdateProjectAssignment(LpObject project, LpObject data)
{
return GetObject<Item>(put("/workspaces/" + this.WorkspaceId + "/projects/" + project.id + "/update_assignment", new
{
assignment = data
}));
}
```
Creation of the project works fine, but I get 404 when I try to do the update project assignment. Any ideas?
Posted by LiquidPlanner Support over 4 years ago
throttling error
*Posted on behalf of a customer. Original posting date 2015-02-06.*
We are building an interface to time tracking via the LP API. Although were are doing our best to cut down requests while testing (with one person) I am getting the following error at some points...
```
12:53:20: stdClass Object
(
[type] => Error
[error] => Throttled
[message] => 33 requests, exceeds limit of 30 in 15 seconds. Try again in 4 seconds, or contact [email protected]
)
```
When the site is launched (very soon) we will have 40 people using this time tracking tool
```( http://XXXXXXXX.com/liquidplanner/time.php )``` and will need much more than 2 requests per second at times.
The throttling comes from the LP API. If you hit the API too many times in 15 seconds the request is denied, causing an error on our side. We are requesting that LP allow use more than 30 requests to the API every 15 seconds.
Please advise.
Posted by LiquidPlanner Support over 4 years ago
Tags question
*Posted on behalf of a customer. Original posting date 2015-02-04.*
"I was wondering if you or your colleagues could help me with one thing ... I'm working on my JIRA integration script and I'm having trouble updating the tags on a newly created LP task (I'm trying to tag it with the JIRA ID).
There's no mention of updating tags in the API docs, and the only help I could find is this random comment: https://developer.liquidplanner.com/discuss/5d7965cdeec400003a846fff
However, I wasn't able to get very far in submitting a POST or PUT that the API would process as a request to update or create new tags.
Anyway, let me know if you have any additional resources that could help out, or put me in touch with someone that could point out what I'm doing wrong.
Thanks!"
Posted by LiquidPlanner Support over 4 years ago
Filtering projects with the API
*Posted on behalf of a customer. Original posting date 2015-01-29.*
Hello, I hope you are well today.
I make the following curl request
```
https://app.liquidplanner.com/api/workspaces/######/projects
```
This works.
However, I’d like to only get the projects if the “external_reference” value is not null. (ideally if the external_reference equals a specific string), but essentially it’s the same question. (the api documents show external_reference so I do believe this is a universal field for all LP users.)
Of course I can pull all projects and loop through the results but it would be really nice to just pull the projects that have external_reference values I need.
Is this possible through one curl request? if so, could you provide me with an example? If not is there any plan for functionality like this through the API in the future? (I won’t need this functionality for another month or so)
Please let me know if I need to clarify my question.
Thank you for your time.
John Moscarillo
[curl request edited by LiquidPlanner support]
Posted by LiquidPlanner Support over 4 years ago
Update the description in an existing task from rest api? What URL and what JSON structure?
*Posted on behalf of Ashish Jain. Original posting date 2015-01-26.*
Hi All,
how can i update the description in existing task from rest api, what url and what the structure of json is require for update the description of a task ?
Posted by LiquidPlanner Support over 4 years ago
How to create an assignment with remaining estimate ?
*Posted on behalf of Thibaud. Original posting date 2015-01-26.*
Hi,
When I create a new assignment using the /treeitems/###/update_assignment URL, the low and high remaining efforts aren't taken into account.
Here's an example:
`` URL: /workspaces/#####/treeitems/######/update_assignment``
POST Data:
``"person_id": #####, "low_effort_remaining": "4h", "high_effort_remaining": "8h" ``
I tried with both virtual and non virtual members without success. Also, updating an existing assignment (passing assignment_id) works fine. This forces to make 2 calls for new assignments. Am I missing something?
Regards,
P.S: looking in the forum I found that when creating a task, the estimates for all assignments can be set using the estimate key with low and high attributes, which is really useful but not documented anywhere (that I could find). This actually fixes my issue in the case of new tasks. I recommend updating the API documentation to include this as it is a quick workaround to prevent using multiple requests.
I even found that the documentation for the changes of january 10th expressively states that creating a task and setting estimates is not doable anymore, while I just tested that it works:
Link: https://developer.liquidplanner.com/discuss/5d66b02666da7000500eaa81
Section: Creating a treeitem and estimating it in one request
Posted by LiquidPlanner Support over 4 years ago