This is the JSON Payload :
{
"pointAssignments": [
{
"configurationId": 2738
}
],
"workItem": 3931630
}
The Response Code is '200 OK' but the response is :
{
"count": 0,
"value": []
}
I'm not sure why this is not working. Any suggestions ?
I was expecting the WorkItem (Test Case) to be added to the Suite with the Configuration ID mentioned in the JSON Payload.
https://dev.azure.com/{xx}/{yy}/_apis/testplan/Plans/2781987/suites/3681479/TestCase?api-version=7.0
The JSON Payload you pass to the API request is not correct. For your case, the correct JSON Payload is below.
[
{
"pointAssignments": [
{
"configurationId": 2738
}
],
"workItem": {
"id": 3931630
}
}
]
If you want to add multiple test cases with multiple configurations, the JSON Payload should look like the following sample.
[
{
"pointAssignments": [
{
"configurationId": 28
},
{
"configurationId": 29
}
],
"workItem": {
"id": 112
}
},
{
"pointAssignments": [
{
"configurationId": 28
},
{
"configurationId": 29
}
],
"workItem": {
"id": 113
}
}
]