Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't have curl available to test right now but you might be able to fashion something out of the following information.</p> <p>Check in and check out is handled by /_layouts/CheckIn.aspx</p> <p>The page has the following querystring variables:</p> <p><strong>List</strong> - A GUID that identifies the current list.</p> <p><strong>FileName</strong> - The name of the file with extension.</p> <p><strong>Source</strong> - The full url to the allitems.aspx page in the library.</p> <p>I was able to get the CheckIn.aspx page to load correctly just using the FileName and Source parameters and omitting the List parameter. This is good because you don't have to figure out a way to look up the List GUID.</p> <p>The CheckIn.aspx page postbacks to itself with the following form parameters that control checkin:</p> <p><strong>PostBack</strong> - boolean set to true.</p> <p><strong>CheckInAction</strong> - string set to ActionCheckin</p> <p><strong>KeepCheckout</strong> - set to 1 to keep checkout and 0 to keep checked in</p> <p><strong>CheckinDescription</strong> - string of text</p> <p>Call this in curl like so </p> <p>curl --data "PostBack=true&amp;CheckinAction=ActionCheckin&amp;KeepCheckout=0&amp;CheckinDescription=SomeTextForCheckIn" http://<em>{Your Server And Site}</em>/_layouts/checkin.aspx?Source=<em>{Full Url To Library}</em>/Forms/AllItems.aspx&amp;FileName={Doc And Ext}</p> <p>As I said I don't have curl to test but I got this to work using the Composer tab in Fiddler 2</p> <p>I'm trying this with curl now and there is an issue getting it to work. Fiddler was executing the request as a POST. If you try to do this as a GET request you will get a 500 error saying that the AllowUnsafeUpdates property of the SPWeb will not allow this request over GET. Sending the request as a POST should correct this.</p> <p><strong>Edit</strong> I am currently going through the checkin.aspx source in the DotPeek decompiler and seeing some additional options for the ActionCheckin parameter that may be relevant such as ActionCheckinPublish and ActionCheckinFromClientPublish. I will update this with any additional findings. The page is located at Microsoft.SharePoint.ApplicationPages.Checkin for anyone else interested.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload