Tracing the Vault API

Picasso ones said, „Good Artists Copy; Great Artists Steal”. You like to write some Vault API code, in .Net or PowerShell, and are fighting with the right sequence of commands and appropriate arguments? Why not click the sequence in the Vault client and copy the code generated by the Vault client?

The Vault client communicates via HTTP (Web Services – SOAP) with the Vault server. Tools like Fiddler can monitor the HTTP traffic, so that you can spy what the Vault client is talking to the Vault server and learn from that. Doug Redmond wrote years ago this blog. However, the SOAP communication is quite verbose, and because is not plain XML (it’s multipart), the Fiddler cannot show you the content in a nice, readable way.

Good news, Fiddler can be extended. We did this and created the vapiTrace (Vault API trace)

Just copy the vapiTrace extension to the C:\Program Files (x86)\Fiddler2\Inspectors folder. Start Filler, and you should see the vapiTrace tabs. Now, when you login into Vault (don’t use localhost), you’ll start seeing the client-server traffic and by clicking on the single communication lines, the vapiTrace tabs will show the request and the response in a simpler and readable way.

Let’s say you want to know how to create a new Vault folder via the API. Just go in Vault and create the folder manually and then pick in Fiddler the according command, and see which Vault API have been called, with which arguments. The best is that you can now delete your folder in Vault, and try to create it via API by using the same function with same arguments. Just keep in mind, that only arguments with values are transferred. So, it might be that your Vault API function requires 5 arguments, but in Fiddler you just see 3. This means that the two missing arguments will be null.

Now, Fiddler will trace any HTTP connection, therefore you will have a lot of noise. Activate the filter by going on the Filters tab, and set the filter that shows only URLs that contains “AutodeskDM”.

So, now you can experiment with the Vault API by simulating your action in Vault by hand first, and look into the Fiddler tracing how Vault is doing it, and you just have to do the same.


This entry was posted in Vault API. Bookmark the permalink.

4 Responses to Tracing the Vault API

  1. Thanks for sharing the vapiTrace extension. Very powerfull tool when browsing the api manual for a certain command.
    Suggestion: Show this in a AU2017 Class!

    Best regards,
    Maarten Weers
    Parker Hannifin, Oldenzaal, Netherlands.

  2. Pingback: Fixing the BOM blob | coolorange

  3. Pingback: Complete your Vault data | coolorange

  4. Uwe Handzik says:

    Da macht die Fehlersuche wieder Spaß – Danke an das coolOrange Team !

    Mit freundlichen Grüßen aus dem Sauerland
    Uwe Handzik

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s