REST API: Request Test Cases by filter with MultiValue

Wednesday, August 3, 2022
Avatar

How can i request multiple test cases filtered by its Ids with a MultiValue? I don't know which datatype is required for the MultiValue. I tryed several types but always get errors. Can somebody give me an example? I use REST API v6.0 / SpiraTeam v7.0.0.0 and JSON as request body.

2 Replies
Thursday, August 4, 2022
Avatar
re: Pierre Wednesday, August 3, 2022

You can use something like:

"MultiValueFilter": {
   "IsNone": false,
   "Values": [1, 2, 3]
}

Regards
David

Thursday, August 25, 2022
Avatar
re: inflectra.david Thursday, August 4, 2022

Hello David

Your suggestion doesn't work. I tryed several things:

{
   "MultiValueFilter": {
      "PropertyName": "TestCaseId",
      "Values": [1, 2, 3]
   }
}

or

{
   "PropertyName": "TestCaseId",
   "MultiValueFilter": {
      "Values": [1, 2, 3]
   }
}

With this I don't get an error from the server but the server replys all Test Cases instead of this ones with Id 1, 2, 3.

Statistics
  • Started: Wednesday, August 3, 2022
  • Last Reply: Thursday, August 25, 2022
  • Replies: 2
  • Views: 221