Reputation: 1090
I am using the Azure DevOps API to put together a report of build metrics. I am looking for a way to add a global time range query parameter to my calls, so that I am only querying items that occur within the range of time x and time y.
It appears some specific calls contain a query parameter such as a "creationDate" or "startTime"; however I am unable to find a way to globally limit the date range of API calls I make. I am using a large selection of REST endpoints and many either do not contain a time range query parameter or use a different implementation method to accomplish the same thing.
In short, I am looking for a way to globally limit the Azure DevOps REST API with either a query parameter or an API key setting to return results within a specific range. Is this possible?
Upvotes: 0
Views: 358
Reputation: 19381
I am looking for a way to specify a time range such as "get all builds that ran within the last week" or "get all pipelines created within the last month" without modifying my code to parse these elements from each response.
If so, agree with Krzysztof Madej, if the rest api does not provide parameters to specify the date range, there should be no out-of-the-box method to achieve this demand.
The Builds-List rest api provides parameters such as maxTime
, minTime
to specify the date range, while the Pipelines-List rest api does not provide such parameters to specify the date range.
So, if you don’t want to modify the code to parse these elements from response, I think this is currently impossible.
Upvotes: 1