Skip to content

Latest commit

 

History

History
119 lines (82 loc) · 3.94 KB

File metadata and controls

119 lines (82 loc) · 3.94 KB
author learafa
description Check out a driveItem resource to prevent others from editing the document, and your changes from being visible until the documented is checked-in.
title driveItem: checkout
ms.localizationpriority medium
ms.subservice sharepoint
doc_type apiPageType
ms.date 04/04/2024

driveItem: checkout

Namespace: microsoft.graph

Check out a driveItem resource to prevent others from editing the document, and prevent your changes from being visible until the documented is checked in.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

[!INCLUDE app-permissions]

HTTP request

POST /drives/{driveId}/items/{itemId}/checkout
POST /groups/{groupId}/drive/items/{itemId}/checkout
POST /me/drive/items/{item-id}/checkout
POST /sites/{siteId}/drive/items/{itemId}/checkout
POST /users/{userId}/drive/items/{itemId}/checkout

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, the API call returns 204 No content.

Example

This example checks out a file identified by {item-id}.

Request

POST https://graph.microsoft.com/v1.0/drives/{drive-id}/items/{item-id}/checkout

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

HTTP/1.1 204 No content