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.

3 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.

Tuesday, December 20, 2022
Avatar
re: Pierre Thursday, August 25, 2022

New try, new luck.

Finally the query with multiple values works. The syntax is:

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

 

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, August 3, 2022
  • Last Reply: Tuesday, December 20, 2022
  • Replies: 3
  • Views: 684