adding people to a task using API

Comments

3 comments

  • Official comment
    Avatar
    Brett Bender

    To "Add People" to a task, you'll want to use the /update_assignment endpoint.

    Here are docs:

    https://developer.liquidplanner.com/docs/assignments#section-updating-creating-removing-assignments

    To add a person with ID 123, you'll POST to the /update_assignment endpoint with:

    { "person_id": 123 }

    as your payload.

    Comment actions Permalink
  • Avatar
    Andrew Blum

    Thanks Brett.  That did the trick ! 

    I was able to use /api/v1/workspaces/:workspace_id/treeitems/:treeitem_id/update_assignment to handle reassigning the task to a person with a different id with a payload similar to:

    {"person_id":1234,"assignment_id":4567}

    I had some additional confusion in the documentation about the values of the treeitem_id and the assignment_id referenced.  After some experimentation I determined that the assignment treeitem_id and the task_id were the same  ie. mytask['id'] = mytask['assignments'][0]['treeitem_id']

    I then determined the assignment_id I needed to use in the payload had a value of mytask['assignments'][0]['id']

    Neither of these were obvious to me from the documentation. 
    Does that sound right to you ?Regards,Andrew

     

    0
    Comment actions Permalink
  • Avatar
    Nadia Welter

    Hi Andrew, 

    Yes, you are correct! I'll see what we can do to make the documentation a little more clear on this. 

    0
    Comment actions Permalink

Please sign in to leave a comment.