-1

I want download WIQL report using REST API. REST response doesn't give all fields but it gives a list of URLS as workItems.

To get field values I need to download each WorkItem separately. Any direct REST way to accomplish this in a single REST call?

Repeated REST calls gives me rate limiting or similar error. I get error 500 types after repeated GET request.

Genesis of this need is - There are no aggerate functions available likes of SUM, MAX, MIN, AVG Etc.

forvaidya
  • 3,041
  • 3
  • 26
  • 33
  • This helps. I have tried it. but it requires me to write more logic in my code – forvaidya Apr 08 '20 at 11:29
  • Yes, the rest api provides several basic option like returning IDs, get WorkItems via IDs... To achieve your requirements, we have to make a combination of these basic rest apis to get what we need. – LoLance Apr 14 '20 at 08:47

1 Answers1

0

REST response doesn't give all fields but it gives a list of URLS as workItems.

To get field values I need to download each WorkItem separately. Any direct REST way to accomplish this in a single REST call?

Sorry but as I know, there's no direct rest api available to get WIQL report. An alternative workaround should be:

1.Use Query By Wiql to return the list of WorkItem IDs and Urls (I think this is the same rest api you use).

2.Then use Get Work Items Batch to get all the details(fields) about the requested work item ids. And here's one issue which has similar needs like yours, you can use the upgraded script from konpro11 to get list of IDs and use the IDs to get your report (with the help of second rest api).

Hope it helps :)

LoLance
  • 25,666
  • 1
  • 39
  • 73