Adding the Approval details in the Work Log response of the API version-3
Implementedwe have explored the API api/rest/workLogs/all?$fromTimestamp=2018-05-01&api-version=3.0-preview to get the Work Logs. But we have following observations with it, which may restrict us on using the API version 3.0 because of the absence of many very vital data field (in respect of our applications) in the API response:
- The API response does not contain any field ApprovalState for the Work Logs. In our applications there is a heavy usage of the ApprovalState and there are many business logics based on that. If it is not available in API response the application will not work with the API version-3.0
- The API response does not contain any field TeamProject for the Work Logs. In our application we need to visit the VSTS to get some detail of the WorkItemID based on the WorkItemID/TFSID we are getting from Time Tracker Data. To get the data from VSTS against the workItemID using the VSTS API the Team Project is a mandatory parameter (GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems?ids={ids}&api-version=5.0) which we are getting from the Time Tracker Data. If this information is missing our application will not work with the API version-3.0
- In the API response of OData version – 2.1, there is a field called Effort, it provides the time booked in hours. But now in above API- version 3.0-preview it have a field length which we think hold the time booked in seconds. Is my understanding correct..?? Also is it possible to provide tracked/booked time in hours in API- version 3.0-preview in future releases.
- The API response does not contain any field WorkItemType for the Work Logs. In our applications there are many vital logic based on this fields specially the reporting applications will complete fail if this field is not available in API response.
-
Hi Sukanta!
1) TeamProjectis not a mandatory parameter, so you could use https://dev.azure.com/{organization}/_apis/wit/workitems?ids={ids}&api-version=5.0 to get all workitem details. Effort, WorkItemType (and TeamProject if you need it) fields are also stored in this response.
TeamProject, Effort, WorkItemType are part of DevOps Services API, so it is not planned to include it in Timetracker API.
2) All data in Timetracker internally stored in Seconds to have the most precision. You could just divide it by 3600 to get it in Hours.
So let us assume, this Feature Request is only about adding Approval data to Timetracker API v3.
Kind regards,
Andarth
Please sign in to leave a comment.
Comments
3 comments