FAQ: Vault Client API or Web Service

A collection of information about Vault, including solutions to common problems.

Moderator: SourceGear

Post Reply
ericsink
Posts: 346
Joined: Mon Dec 15, 2003 1:52 pm
Location: SourceGear
Contact:

FAQ: Vault Client API or Web Service

Post by ericsink » Wed Feb 18, 2004 10:23 am

Lots of Vault users want to write custom clients which communicate directly with the Vault server. Often, they ask us whether they should use the Vault Client API or simply call the Vault server's Web Service directly.

In basically every situation, you should use the Vault Client API. This API is a set of .NET libraries which provide a framework for writing all kinds of Vault client applications. All of SourceGear's own client apps were in fact written on top of these libraries.

The Vault Client libraries certainly do involve a learning curve. We admit that the documentation is rather poor :( . Furthermore, we do not yet consider this API to be "frozen". It may still evolve somewhat in future releases.

However, we do provide the source code for the Vault command line client as a sample app. This is the best place to start when beginning to use the Vault Client API.

Furthermore, we are happy to answer any questions about the API. Just post your question to the Vault support forum here on support.sourcegear.com.

In contrast, calling the Web Service directly would be far more difficult. Our Web Service API was designed for performance, not for ease of use. In fact, it's downright unfriendly. For example, all the file data transferred between the Vault client and server is encoded in VCDiff format as specified in RFC 3284. If you call the Web Service directory, you'll need to provide your own VCDiff engine to encode and decode the data. (Oh and BTW, we've never tested our VCDiff engine for interop with any other implementation of the spec.)

Bottom line: Save yourself some pain. Use the Vault Client API, not the Web Service.
Eric Sink
Software Craftsman
SourceGear

Post Reply