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.