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];
PutFileOnSP(study);
var serverStudy = context.GeotechnicalStudies.Where(s => s.Name == study.Name).FirstOrDefault();
serverStudy.StudyArea = study.StudyArea;
serverStudy.StudyPerformedBy = study.StudyPerformedBy;
serverStudy.StudyNumber = study.StudyNumber;
context.UpdateObject(serverStudy);
}
context.SaveChanges();