Version one API - get sprint (timebox) wise counts of issues, stories, defects, backlog items

334 Views Asked by At

My goal is to fetch just the counts of stories, issues, backlogs, defects associated with respect to a particular timebox and project.

I know I can fetch an asset's details using using this (for defects)

<Server Base URI>/rest-1.v1/Defect/?sel=Number,Name,CreateDate&where=Timebox.Name=<sprint name>;Scope.Name=<project>

But doing it this way I'd have to do query for different assets. Is it possible to get this sprint wise info with a single query.

Any help would be greatly appreciated.

1

There are 1 best solutions below

0
Balasubramanyam Evani On

Answering my own question.

Using query.v1 read-only API, I could achieve writing multiple queries. Also this repository here grammars, contains documentation of the syntax for tokens which can used within queries

{
   "from":"Timebox",
   "where":{
      "Schedule.ScheduledScopes":"<SCOPE_ID>"
   },
   "select":[
      "Name",
      "BeginDate",
      "EndDate",
      "Workitems:<ASSET_TYPE>[AssetState!='Closed';Scope='<SCOPE_ID>'].@Count"
      ...
   ]
}

Replace SCOPE_ID (Project), ASSET_TYPE (Defect, Story etc.) to get the values