Batch API only allowing 3 tasks to be posted at a time

I am adding my request to see if anyone can identify anything that could be causing the issue. In this example, I am trying to submit 5, but only 3 go through. It doesn’t matter how many I submit, only 3 go through. The rest get 503 errors saying an unexpected error occurred…

Here is my request:
curl --location ‘https://app.asana.com/api/1.0/batch
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–header 'Authorization: Bearer ###
–data ‘{
“data”: {
“actions”: [
{
“relative_path”: “/task_templates/templateId/instantiateTask”,
“method”: “post”,
“data”: {
“name”: “Name 001”,
“memberships”: [
{
“project”: “projectId”,
“section”: “sectionId”
}
]
}
},
{
“relative_path”: “/task_templates/templateId/instantiateTask”,
“method”: “post”,
“data”: {
“name”: “Name 002”,
“memberships”: [
{
“project”: “projectId”,
“section”: “sectionId”
}
]
}
},
{
“relative_path”: “/task_templates/templateId/instantiateTask”,
“method”: “post”,
“data”: {
“name”: “Name 003”,
“memberships”: [
{
“project”: “projectId”,
“section”: “sectionId”
}
]
}
},
{
“relative_path”: “/task_templates/templateId/instantiateTask”,
“method”: “post”,
“data”: {
“name”: “Name 004”,
“memberships”: [
{
“project”: “projectId”,
“section”: “sectionId”
}
]
}
},
{
“relative_path”: “/task_templates/templateId/instantiateTask”,
“method”: “post”,
“data”: {
“name”: “Name 005”,
“memberships”: [
{
“project”: “projectId”,
“section”: “sectionId”
}
]
}
}
]
}
}’

All seems correct, (I suppose that “ and ” are " !!)

But, you try to create 5 tasks in the same project simultaneously, I don’t know if that can be the issue…
I never tried the batch endpoint to do something like that.
We usually use it to query different independent data.

Correct. I think the quotes were just a format thing from copying and pasting. :slight_smile:
Every test so far has the same result. Only 3 get created.

Before going the batch post route, I also tried just looping through and calling the instantiateTask from template and I get the same results. After 3 are posted, it starts to fail. I’ve read and reread the docs and don’t see anywhere where this is a limit, but I’m beginning to assume it must be.

That’s really odd; there shouldn’t be any limit happening there. You should get a message in the failure response; can you look and post it here?

“message”: “Oops! An unexpected error occurred while processing this request. The input may have contained something the server did not know how to handle. Usually waiting and then retrying the request once fixes this. If the issue is persistent, please contact api-support@asana.com and include the error phrase from this response.”,
“phrase”: “2 cagey newts cheer fairly fast”

OK, that indicates an internal Asana issue; they can look up the details using that phrase.

@John_Baldo @Jeff_Schneider

I am hopeful someone here will be able to suggest something. I contact support, provided that code along with the call I made, and they told me to check here.