SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get metadata information from a previous version of a document in a document library using a SharePoint webservice?

I know I can use the _vti_bin/Versions.asmx webservice to get information about a previous version, but can I get the previous versions metadata?

If it's not possible through webservice is it possible using Client Object Model?

share|improve this question
Vedran, I need to get title of item for all versions? when i use the above method and mention title as field name , it returns collection of child nodes of all the items . So how do we get to know which title is belonging to which version? – user20852 Nov 18 '13 at 21:47
up vote 5 down vote accepted

Versions web service is no use in your case. You need to use Lists web service (http:///_vti_bin/lists.asmx) and Lists.GetVersionCollection Method

Returns version information for the specified field in a SharePoint list.

So you need to query field by field and as far as I know there is no method to return all field versions at once.

Your code could look something like this:

WSLists.Lists listService = new WSLists.Lists();
listService.UseDefaultCredentials = true;
XmlNode result = listService.GetVersionCollection(
    "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "[ITEM ID]", "[FIELD NAME]");
string outerXml = result.OuterXml;

and outerXML looks something like this:

<Versions xmlns="">
  <Version [FIELDNAME]="[VALUE]" Modified="[TIMESTAMP]" Editor="[USER]" />

I never used this approach but I did some tests (on SP 2010 - but I don't think there is difference). I never found good way to easily get all fields for all versions.

And Client Object Model is SP 2010 feature only but except of FileVersion Class I don't see anything similar to 'Get me item versions with metadata'.

share|improve this answer
Thank you Vedran. That worked just perfect! – Jonas Engdahl Sep 23 '11 at 14:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.