LiquidPlanner Classic Forum
Problem with request throttling when using templates to create new projects via the api
Posted on behalf of steve seeley. Original posting date 2014-12-08.
I’m having a problem with request throttling when using templates to create new projects via the api. We have a ticketing system (TS) that needs to feed ticket projects into LiquidPlanner (LP). We store the project definition as a template in LP. Because there is no copy/duplicate project in LP we have to read the project template in parts, then create the new project part by part. This is causing us to exceed the 30 request in 15 seconds limitation. Below is an example of a 21 request process. However this successful TS ticket to LP project only has 2 tasks with 3 checklist items on the first task and 2 checklist items on the second task. How can I reduce the number of request for this process. Thanks, Steve
I’ve replaced our workspace ID with 123456 for our protection.
---> find correct project template based on tags
https://app.liquidplanner.com/api/workspaces/123456/packages?filter[]=name%20=%20Venice%20Templates ---> get Venice Template Package
https://app.liquidplanner.com/api/workspaces/123456/treeitems/18805939?depth=-1&leaves=true ---> get templates (HSPICE & Collateral)
https://app.liquidplanner.com/api/workspaces/123456/projects/18805941/tags ---> get HSPICE tags (api & vcat_hspice)
https://app.liquidplanner.com/api/workspaces/123456/projects/18963553/tags ---> get Collateral tags (api & vcat_collateral)
https://app.liquidplanner.com/api/workspaces/123456 ---> get INBOX ID to place new project into (11782703)
---> create new project
https://app.liquidplanner.com/api/workspaces/123456/projects {"project":{"parent_id":11782703,"name":"Create Kitadake Seabird DB","owner_id":490753,"description":"This is a collateral task description"}}
---> add tags
https://app.liquidplanner.com/api/workspaces/123456/projects/19032157/tags {"tag":{"text":"api"}}
https://app.liquidplanner.com/api/workspaces/123456/projects/19032157/tags {"tag":{"text":"collateral"}}
---> add 1st task
https://app.liquidplanner.com/api/workspaces/123456/tasks {"task":{"name":"First Task","parent_id":19032157,"description":""}}
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032169/update_assignment {"person_id":490753}
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032169/track_time {"low":9,"high":33}
https://app.liquidplanner.com/api/workspaces/123456/tasks/18963554/checklist_items ---> get template checklist items for 1st task
---> add checklist items to 1st task on new project
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032169/checklist_items {"checklist_item":{"name":"Contact Customer","sort_order":0}}
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032169/checklist_items {"checklist_item":{"name":"Call Customer Again","sort_order":1}}
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032169/checklist_items {"checklist_item":{"name":"Call Customer","sort_order":1}}
---> add 2nd task
https://app.liquidplanner.com/api/workspaces/123456/tasks {"task":{"name":"Second Task","parent_id":19032157,"description":""}}
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032189/update_assignment {"person_id":490753}
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032189/track_time {"low":0,"high":0}
https://app.liquidplanner.com/api/workspaces/123456/tasks/18974501/checklist_items ---> get template checklist items for 2nd task
---> add checklist items to 2nd task on new project
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032189/checklist_items {"checklist_item":{"name":"Contact Customer","sort_order":0}}
https://app.liquidplanner.com/api/workspaces/123456/tasks/19032189/checklist_items {"checklist_item":{"name":"Call Customer","sort_order":1}}