C# Purge Historical Data

Examples of programs integrating with Vault and Fortress API. Also, information on integrating with NAnt, CruiseControl.Net and other third-party tools

Moderator: SourceGear


Posts: 324
Joined: Fri May 13, 2005 1:50 pm
PostPosted: Wed Mar 17, 2010 11:27 am
We are upgrading to Vault 5.0.3 (from 3.16).
We know the 5.0.3 Admin tool provides a User Interface to delete/purge past Vault labels.
While this works, we want to automate the process like this as we have hundreds of repos.

loop through all the repos. (need API)
Once inside a repo.
get all the labels (need API).
Determine the label date/time (eed API)
delete label if the label date/time is <= 18 months from today) Only want to keep the last 18 months of repos.

Does your API provide these interfaces? If so, can you tell which ones I need.
Does anyone have a working example? I prefer C# but will take VB.net too.

I am aware of VaultClientIntegrationLib has a method called ServerOperations.ProcessCommandDeleteLabel() but I need methods that will get me the repo/labels creation date. Once I had this I could then code accordingly.

Thanks
Btd

Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
PostPosted: Thu Mar 18, 2010 8:11 am
Before you spend time coding this, you should know that the Vault Show Labels dialog can delete multiple labels at once. The method would then be: Log in to the repo. Show labels on Root. Select a bunch. Right-click and choose delete.

I'm unsure if that's in 3.1, but I know that it's in 5.0. You may have to upgrade first, then delete old labels.
Subscribe to the Fortress/Vault blog

Return to Examples (API)

Who is online

Users browsing this forum: No registered users and 0 guests

cron