There is not a predefined attribute for cycle time. Rather, the value must be calculated using the attribute definition syntax. We use the History
attribute, filtered by the range of statuses that make up the cycle, and sum up the days.
History[Status.Name='Future','In Progress','Done'].Days.@Sum
You can use the query.v1 endpoint to POST the following query:
from: Defect
where:
Scope.ParentMeAndUp.Name: The Desired Project
select:
- Name
- Status
- History[Status.Name='Future','In Progress','Done'].Days.@Sum
Or, using the rest-1.v1/Data endpoint, you can GET the following query:
<Server Base URI>/rest-1.v1/Data/Defect?where=Scope.ParentMeAndUp.Name='The%20Desired%20Project'&sel=Name,Status,History[Status.Name='Future','In%20Progress','Done'].Days.@Sum