MicrosoftDocs / vsts-rest-api-specs

MIT License
158 stars 114 forks source link

POST to "Test History" getting 200 OK but missing response data #610

Open mehmetalperen opened 11 months ago

mehmetalperen commented 11 months ago

When I post this JSON: { "automatedTestName": "testName", "GroupBy": "branch", // tried environment too, I am not sure what branch and environment do "testCaseId": 123456 // test id : int } to URL: https://{organization}/{project}/_apis/test/Results/testhistory?api-version=7.0

I get 200 OK but the response body is missing actual data. I get this: { "automatedTestName": "testName", "testCaseId": 123456, "maxCompleteDate": "2023-07-24T16:57:01.2138963Z", "trendDays": 7, "groupBy": "branch", "continuationToken": "", "resultsForGroup": [] } By this post request, I am trying to get this: image Issue is that it does not give me the data I need even though getting 200 OK response. The response is missing the data.

vinayakmsft commented 4 months ago

Hi verified that its not a bug. Correct parameters needs to be passed , please check the documentation - https://learn.microsoft.com/en-us/rest/api/azure/devops/test/test-history/query?view=azure-devops-rest-7.1