Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

API call, utilizing "markDone" for task

Avatar

Level 5

We have been successfully using an API to search for specific tasks and mark them done/complete.
The following has worked as expected, when one user is assigned to the task:

  1. Call Workfront's API
  2. Search for the project number
  3. This returns the projectID
  4. Use the projectID and search for task name "Build"
  5. This returns taskID
  6. Use taskID and call "markDone"

We are now assigning two people to the "Build" tasks, but the above will only update the task as "Done with my part." What should we use other than markDone so that the task will be Complete?

We also tried assigning a Team to the task, but the status did not update at all.

 

Any ideas?? Thank you!

 

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hello Cathy,

 

If more than one object is assigned to a task, it is necessary to pass a status as an argument.

 

So, if you call the action markDone, you also have to pass something like this in your body. Before you will need to check, which key corresponds to completed in your statuses.

 

{
"status": "CPL"
}

 

This should finally complete the task.

 

For me it would be interesting, how your workflow is set up, as I only see the possibility to set markDone via API, if you use one of the assigned users for the API call. If you are using a dedicated account for API calls, there is no possibility to pass an assignmentID to mark a task as done, which is not assigned to this user.

 

Regards

Lars

 

View solution in original post

5 Replies

Avatar

Community Advisor

Are you just trying to update the status? If so, could you just update the status directly?

Avatar

Community Advisor

I have to say, I'm pretty curious about what would happen if you called markDone twice (one for each user)

Avatar

Level 5

Full transparency - this is not my process, but I wondered the same thing and asked my user. He said that it just marks his portion of the task done again, it does not mark the other assignee's part Done.

Avatar

Correct answer by
Level 10

Hello Cathy,

 

If more than one object is assigned to a task, it is necessary to pass a status as an argument.

 

So, if you call the action markDone, you also have to pass something like this in your body. Before you will need to check, which key corresponds to completed in your statuses.

 

{
"status": "CPL"
}

 

This should finally complete the task.

 

For me it would be interesting, how your workflow is set up, as I only see the possibility to set markDone via API, if you use one of the assigned users for the API call. If you are using a dedicated account for API calls, there is no possibility to pass an assignmentID to mark a task as done, which is not assigned to this user.

 

Regards

Lars