Test Plans API - Create Test Plans

Gregory Lourenço 1 Reputation point
2021-03-22T14:38:06.683+00:00

Hello,

I'm trying to create a test plans through the Azure DevOps API 6.0.

I'm using a personal access token.

Request :
fetch(https://dev.azure.com/${organization_name}/${project_name}/_apis/testplan/plans?api-version=6.1-preview.1, {
"method": "POST",
"headers": {
"Authorization": {{fetch_headers_authorization}},
"Content-Type": "application/json"
},
"body": {
"name": "test_azure_api",
"areaPath": {{project_name}}\\QA,
"iteration": {{project_name}}\\4.37
}
})

Response :
{
'$id': '1',
innerException: null,
message: 'TF400898: An Internal Error Occurred. Activity Id: 0f7b1add-78c3-4f5f-86a4-b1027f1d839d.',
typeName: 'Newtonsoft.Json.JsonReaderException, Newtonsoft.Json',
typeKey: 'JsonReaderException',
errorCode: 0,
eventId: 0
}

Can you please tell show me an example of a working fetch request for that purpose.

Please, can you alse indicate what's the mandatory input in the body request.

Best Regards.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,261 questions
0 comments No comments
{count} votes