versionone

How to use http api (or any V1 api) to request sql where with or


I would prefer to make less queries to the version one site. Im trying to get a list of unassigned tickets (Status.Name="") and tickets that are in progress (Status.Name="In Progress").

I have checked documentation and haven't been able to find much regarding OR statments, or perhaps im not very good at reading. shrug

Helpful api documention

Other api documention

Currently I am grabbing the whole list and filtering out what I need (https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Defect). This i just not acceptable as the list will grow.

I will accept an answer - that shows how to return 'Status.Name="In Progress" OR Status.Name=""' through any version one api, not just the one im using. - or that there is no way to do this in one request and that i have to make multiple requests.

If you are checking out the api, you dont need to make an account or use yours. They have a sample account you can use to access the http api

The username/pass is admin/admin

https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Defect?Where=Status.Name=%22Done%22

https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Defect?Where=Status.Name=%22Accepted%22


Solution

  • So after some futzing with the url and trying some combinations

    Heres how to use an or https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Defect?Where=Status.Name="Done"|Where=Status.Name="Other" Heres how to use an and https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Defect?Where=Status.Name="Done"&Where=Name="Some Title"

    I couldnt figure out how to use them together so (item=Done|item=Other) & title="some thing"