Hi there,
I’m trying to see if it is possible to add a task to two different projects while changing the resource type to “milestone” in one request to reduce the amount of actions.
Currently, I have setup 3 different requests
- Add to project - add to project 1 - PUT
- Add to project - added to project 2 - POST
- Update Task - Change to milestone - POST
Can I combine the body parameters in a way to make one request each?
If anyone can provide some insight, it would be greatly appreciated.
Thanks
Hi,
As seen on the image, the projects
field of a task can’t be used after the creation, you have to use the specific endpoint. And turning a task into a milestone is using the PUT endpoint, so my answer would be no. @Phil_Seeman can you confirm?
@Dorian_Wong what’s wrong with doing 2 requests (except the possible rate limit)?
Hi Bastien,
Thank you for the response. I just wanted to see if there were alternatives to combine my HTTP request as I am using Microsoft Flow to automate our task creations and there is a action limit within one Flow.
Just wanted to see if I could reduce the amount but it seems that I can’t. I’ll proceed with the two Addproject and the Put for milestones.
Thanks again,
Dorian
If these actions are independent, I mean, you don’t need to run one before another for a logical purpose, you can use the “/batch” endpoint.
https://developers.asana.com/docs/submit-parallel-requests
That does not reduce the rate limit, but it allows you to run these 3 actions using one single POST.
2 Likes