Can we use " for loop" in REST API program, to get Multiple Sub-tasks for an Issue ?
Below code i have used for this
REST API code:
{
"fields":
{
"project":
{
"key": "TEST"
},
"parent":
{
"key": "TEST-10"
},
for ( int i=1; i <=3; i++)
{
"summary": "Subtask-TEST10",
"description": "Subtask of TEST-10",
"issuetype":
{
"id": "10601"
}
}
}
}
For executing I used curl command:
curl -D- -u admin:admin -X POST --data "@MutlipleSubtask.txt" -H "Content-Type: application/json" http://localhost:8081/rest/api/2/issue/
Could someone help me with it?
And also is there any other way to do it in RESTAPI?
Thanks in Advance