POST /drives/{driveId}/items/{itemId}/checkin
POST /groups/{groupId}/drive/items/{itemId}/checkin
POST /me/drive/items/{item-id}/checkin
POST /sites/{siteId}/drive/items/{itemId}/checkin
POST /users/{userId}/drive/items/{itemId}/checkin
Request body
In the request body, provide a JSON object with the following parameters.
Name
Value
Description
checkInAs
string
Optional. The status of the document after the check-in operation is complete. Can be published or unspecified.
comment
string
A check-in comment that is associated with the version.
Response
If successful, the API call returns 204 No content.
Example
This example checks in a file identified by {item-id}.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := graphmodels.NewCheckinPostRequestBody()
comment := "Updating the latest guidelines"
requestBody.SetComment(&comment)
graphClient.DrivesById("drive-id").ItemsById("driveItem-id").Checkin().Post(context.Background(), requestBody, nil)
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new CheckinPostRequestBody();
$requestBody->setComment('Updating the latest guidelines');
$graphServiceClient->drivesById('drive-id')->itemsById('driveItem-id')->checkin()->post($requestBody);