I am using the below API to get the successful deployment of a particular pipeline. I am not able to get the deployments happened between particular dates or before particular date.
I tried like below but not getting desired outputs any modification to the below API
Documentation can be found here ( https://docs.microsoft.com/en-us/rest/api/azure/devops/release/deployments/list?view=azure-devops-rest-6.0#releasequeryorder )
Based on your requirement, you need to get the deployments between particular dates or before particular date.
You need to use the parameter: minStartedTime
and maxStartedTime
to replace the CreatedOn
to set the date .
For example:
Between particular dates
Rest API: use minStartedTime
and maxStartedTime
Get https://vsrm.dev.azure.com/{OrganizationName}/{ProjectName}/_apis/release/deployments?definitionId=xx&minStartedTime=2022-02-01&maxStartedTime=2022-02-17&api-version=6.0
Before particular date use maxStartedTime
Get https://vsrm.dev.azure.com/{OrganizationName}/{ProjectName}/_apis/release/deployments?definitionId=xx&maxStartedTime=2022-02-17&api-version=6.0
For more detailed info, you can refer to this doc: Deployments - List
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.