I created a new file in a document library. The file will usually overwrite an existing file and for that process to happen, the file will need to be checked out.
The problem is when I call the checkIn end point, the file does not checkin. Even if I call it multiple times. It does not return any error, but the file remains checked out to myself.
Here is the query I am running:
https://SHAREPOINTURL/_api/web/getfilebyserverrelativeurl('/sites/demo007/pages/default.aspx')/checkIn(comment='Checked in during migration.',checkintype=1)
The required headers for POST request are also in place, considering I recently created that file.
.checkIn( [text] , [majorversion] )
followed by.publish( [Text] )
Maybe REST needs 2 calls as well? – Danny '365CSI' Engelman Jul 20 '16 at 12:04$newFile->checkIn(trans('app.checkin_message'), 1);
$newFile->publish(trans('app.checkin_message'));
No difference – prog_24 Jul 20 '16 at 12:12