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

I am uploading files to SharePoint 2010 following the answer here: Uploading files to Document Libraries using the REST API

The issue is that all of the files are set as checked out due to some required fields in the list. I an using the OData API to update the column values, but I want to automatically check in the files. Is this even possible?

Here's how I'm updating the entities.

    Planning.PlanningDataContext context = new Planning.PlanningDataContext(new System.Uri("http://sharepoint/Service/ds/plan/_vti_bin/ListData.svc"));
    context.Credentials = System.Net.CredentialCache.DefaultCredentials;

    for (int i=0; i < Studies.Count; i++)
        var study = Studies[i];
        var serverStudy = context.GeotechnicalStudies.Where(s => s.Name == study.Name).FirstOrDefault();
        serverStudy.StudyArea = study.StudyArea;
        serverStudy.StudyPerformedBy = study.StudyPerformedBy;
        serverStudy.StudyNumber = study.StudyNumber;
share|improve this question

I don't believe it is possible using the ListData.svc. But you can do it using the Managed Client Side Object Model. I'm not on my dev system right now but I will add a code sample tomorrow.


Just to be certain I attempted to check in a document in my dev server's Shared Documents library using ListData.svc. I attempted to do it by sending a DELETE request to


I did not receive any error but no modification was made. I also sent a POST request trying to set the CheckedOutToId to null. This didn't work either. So I honestly belive there is no way of doing this via the SP 2010 REST API. Here is example code using the Managed Client Object model. This was tested in a console app on my work laptop to my development server.

        ClientContext clientContext = new ClientContext("");
        Web web = clientContext.Web;
        List sharedDocs = web.Lists.GetByTitle("Shared Documents");
        ListItem item = sharedDocs.GetItemById(1);
        File file = item.File;
        file.CheckIn("Checkin comments.", CheckinType.MajorCheckIn);
share|improve this answer

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.