Search code examples
tfsazure-devopstfvc

VSTS REST API - Get list of Items changed after specified date


In vsts rest API I can get List of Items changed before specified date:

http://server:8080/tfs/ProjName/_apis/tfvc/items?versionDescriptor.versionType=date&versionDescriptor.version=2018-06-12T00:00&scopePath=$/Path

But how can I get list of Items changed after this date?


Solution

  • No, we cannot get list of items after the specified date directly via the REST API.

    However you can run the REST API for two times to get the list of items before the specific dates, then compare them to retrieve the list of items which between the different dates.

    For example :

    1. Get the list of items before the date 2018-05-12 :

      GET http://server:8080/tfs/ProjName/_apis/tfvc/items?versionDescriptor.versionType=date&versionDescriptor.version=2018-05-12T00:00&scopePath=$/Path
      
    2. Get the list of items before the date 2018-06-21 :

      GET http://server:8080/tfs/ProjName/_apis/tfvc/items?versionDescriptor.versionType=date&versionDescriptor.version=2018-06-21T00:00&scopePath=$/Path
      
    3. Compare the items from above responses, then you can get the list of items after the date 2018-05-12