1
votes

Having some difficulty retrieving counterId={counterId} in the following API method:

https://{instance}/{collection}/{project}/_apis/build/definitions/{definitionId}?counterId={counterId}&api-version=4.1

Reference: https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/reset%20counter?view=vsts-rest-tfs-4.1

I am trying to retrieve the counterId in order to reset it. Is there any way to retrieve the counterId?

1
Possible duplicate of How to reset VSTS counter?Shayki Abramczyk

1 Answers

0
votes

I’ve found a solution. I can reset the counter by prefixing the custom variable. Also if using a custom variable e.g $[counter(001)], to reset the counter increment the custom variable to $[counter(002)]