Google Drive API (all endpoints)
The Google Drive API allows clients to access resources from Google Drive.
Productivity & workspace#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The Google Drive API allows clients to access resources from Google Drive.
Endpoints 64
about
- GETGets information about the user, the user's Drive, and system capabilities
/aboutGets information about the user, the user's Drive, and system capabilities. For more information, see Return user info. Required: The fields parameter must be…
accessproposals
- GETRetrieves an access proposal by ID
/files/:fileId/accessproposals/:proposalIdRetrieves an access proposal by ID. For more information, see Manage pending access proposals. - GETList the access proposals on a file
/files/:fileId/accessproposals?pageSize=0&pageToken=stringList the access proposals on a file. For more information, see Manage pending access proposals. Note: Only approvers are able to list access proposals on a… - POSTApproves or denies an access proposal
/files/:fileId/accessproposals/:proposalId:resolveApproves or denies an access proposal. For more information, see Manage pending access proposals.
approvals
- POSTApproves an approval
/files/:fileId/approvals/:approvalId:approveApproves an approval. For more information, see Manage approvals. This is used to update the ReviewerResponse of the requesting user with a Response of… - POSTCancels an approval
/files/:fileId/approvals/:approvalId:cancelCancels an approval. For more information, see Manage approvals. Updates the approval Status to CANCELLED. This can be called by any user with the writer… - POSTComments on an approval
/files/:fileId/approvals/:approvalId:commentComments on an approval. For more information, see Manage approvals. This sends a notification to both the initiator and the reviewers. Additionally, a… - POSTDeclines an approval
/files/:fileId/approvals/:approvalId:declineDeclines an approval. For more information, see Manage approvals. This is used to update the ReviewerResponse of the requesting user with a Response of… - GETGets an approval by ID
/files/:fileId/approvals/:approvalIdGets an approval by ID. For more information, see Manage approvals. - GETLists the approvals on a file
/files/:fileId/approvals?pageSize=0&pageToken=stringLists the approvals on a file. For more information, see Manage approvals. By default, this method returns a minimal response that may not include the items… - POSTReassigns the reviewers on an approval
/files/:fileId/approvals/:approvalId:reassignReassigns the reviewers on an approval. For more information, see Manage approvals. Adds or replaces reviewers in the ReviewerResponse of the approval. This… - POSTStarts an approval on a file
/files/:fileId/approvals:startStarts an approval on a file. For more information, see Manage approvals.
apps
- GETGets a specific app
/apps/:appIdGets a specific app. For more information, see Return user info. - GETLists a user's installed apps
/apps?appFilterExtensions=string&appFilterMimeTypes=string&languageCode=stringLists a user's installed apps. For more information, see Return user info.
changes
- GETGets the starting pageToken for listing future changes
/changes/startPageToken?driveId=string&supportsAllDrives=true&supportsTeamDrives=true&teamDriveId=stringGets the starting pageToken for listing future changes. For more information, see Retrieve changes. - GETLists the changes for a user or shared drive
/changes?driveId=string&includeCorpusRemovals=true&includeItemsFromAllDrives=true&includeLabels=string&includePermissionsForView=string&includeRemoved=true&includeTeamDriveItems=true&pageSize=0&pageToken=string&restrictToMyDrive=true&spaces=string&supportsAllDrives=true&supportsTeamDrives=true&teamDriveId=stringLists the changes for a user or shared drive. For more information, see Retrieve changes. - POSTSubscribes to changes for a user
/changes/watch?driveId=string&includeCorpusRemovals=true&includeItemsFromAllDrives=true&includeLabels=string&includePermissionsForView=string&includeRemoved=true&includeTeamDriveItems=true&pageSize=0&pageToken=string&restrictToMyDrive=true&spaces=string&supportsAllDrives=true&supportsTeamDrives=true&teamDriveId=stringSubscribes to changes for a user. For more information, see Notifications for resource changes.
channels
- POSTStops watching resources through this channel
/channels/stopStops watching resources through this channel. For more information, see Notifications for resource changes.
comments
- GETLists a file's comments
/files/:fileId/comments?includeDeleted=true&pageSize=0&pageToken=string&startModifiedTime=stringLists a file's comments. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you… - POSTCreates a comment on a file
/files/:fileId/commentsCreates a comment on a file. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you… - GETGets a comment by ID
/files/:fileId/comments/:commentId?includeDeleted=trueGets a comment by ID. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact fields you need,… - DELETEDeletes a comment
/files/:fileId/comments/:commentIdDeletes a comment. For more information, see Manage comments and replies. - PATCHUpdates a comment with patch semantics
/files/:fileId/comments/:commentIdUpdates a comment with patch semantics. For more information, see Manage comments and replies. Required: The fields parameter must be set. To return the exact…
drives
- GETLists the user's shared drives
/drives?pageSize=0&pageToken=string&q=string&useDomainAdminAccess=trueLists the user's shared drives. This method accepts the q parameter, which is a search query combining one or more search terms. For more information, see the… - POSTCreates a shared drive
/drives?requestId=stringCreates a shared drive. For more information, see Manage shared drives. - GETGets a shared drive's metadata by ID
/drives/:driveId?useDomainAdminAccess=trueGets a shared drive's metadata by ID. For more information, see Manage shared drives. - DELETEPermanently deletes a shared drive for which the user is an `organizer`
/drives/:driveId?allowItemDeletion=true&useDomainAdminAccess=truePermanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items. For more information, see Manage… - PATCHUpdates the metadata for a shared drive
/drives/:driveId?useDomainAdminAccess=trueUpdates the metadata for a shared drive. For more information, see Manage shared drives. - POSTHides a shared drive from the default view
/drives/:driveId/hideHides a shared drive from the default view. For more information, see Manage shared drives. - POSTRestores a shared drive to the default view
/drives/:driveId/unhideRestores a shared drive to the default view. For more information, see Manage shared drives.
files
- POSTCreates a copy of a file and applies any requested updates with patch semantics
/files/:fileId/copy?copyComments=true&enforceSingleParent=true&ignoreDefaultVisibility=true&includeLabels=string&includePermissionsForView=string&keepRevisionForever=true&ocrLanguage=string&supportsAllDrives=true&supportsTeamDrives=trueCreates a copy of a file and applies any requested updates with patch semantics. For more information, see Create and manage files. - GETLists the user's files
/files?corpora=string&corpus=domain&driveId=string&includeItemsFromAllDrives=true&includeLabels=string&includePermissionsForView=string&includeTeamDriveItems=true&orderBy=string&pageSize=0&pageToken=string&q=string&spaces=string&supportsAllDrives=true&supportsTeamDrives=true&teamDriveId=stringLists the user's files. For more information, see Search for files and folders. This method accepts the q parameter, which is a search query combining one or… - POSTCreates a file
/files?enforceSingleParent=true&ignoreDefaultVisibility=true&includeLabels=string&includePermissionsForView=string&keepRevisionForever=true&ocrLanguage=string&supportsAllDrives=true&supportsTeamDrives=true&useContentAsIndexableText=trueCreates a file. For more information, see Create and manage files. This method supports an */upload* URI and accepts uploaded media with the following… - GETGets a file's metadata or content by ID
/files/:fileId?acknowledgeAbuse=true&includeLabels=string&includePermissionsForView=string&supportsAllDrives=true&supportsTeamDrives=trueGets a file's metadata or content by ID. For more information, see Search for files and folders. If you provide the URL parameter alt=media, then the response… - DELETEPermanently deletes a file owned by the user without moving it to the trash
/files/:fileId?enforceSingleParent=true&supportsAllDrives=true&supportsTeamDrives=truePermanently deletes a file owned by the user without moving it to the trash. For more information, see Trash or delete files and folders. If the file belongs… - PATCHUpdates a file's metadata, content, or both
/files/:fileId?addParents=string&enforceSingleParent=true&includeLabels=string&includePermissionsForView=string&keepRevisionForever=true&ocrLanguage=string&removeParents=string&supportsAllDrives=true&supportsTeamDrives=true&useContentAsIndexableText=trueUpdates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some… - POSTDownloads the content of a file
/files/:fileId/download?mimeType=string&revisionId=stringDownloads the content of a file. For more information, see Download and export files. Operations are valid for 24 hours from the time of creation. - DELETEPermanently deletes all of the user's trashed files
/files/trash?driveId=string&enforceSingleParent=truePermanently deletes all of the user's trashed files. For more information, see Trash or delete files and folders. - GETExports a Google Workspace document to the requested MIME type and returns exported byte content
/files/:fileId/export?mimeType=stringExports a Google Workspace document to the requested MIME type and returns exported byte content. For more information, see Download and export files. Note… - GETGenerates a CSE token which can be used to create or update CSE files.
/files/generateCseToken?fileId=string&parent=stringGenerates a CSE token which can be used to create or update CSE files. - GETGenerates a set of file IDs which can be provided in create or copy requests
/files/generateIds?count=0&space=string&type=stringGenerates a set of file IDs which can be provided in create or copy requests. For more information, see Create and manage files. - GETLists the labels on a file
/files/:fileId/listLabels?maxResults=0&pageToken=stringLists the labels on a file. For more information, see List labels on a file. - POSTModifies the set of labels applied to a file
/files/:fileId/modifyLabelsModifies the set of labels applied to a file. For more information, see Set a label field on a file. Returns a list of the labels that were added or modified. - POSTSubscribes to changes to a file
/files/:fileId/watch?acknowledgeAbuse=true&includeLabels=string&includePermissionsForView=string&supportsAllDrives=true&supportsTeamDrives=trueSubscribes to changes to a file. For more information, see Notifications for resource changes.
operations
- GETGets the latest state of a long-running operation
/operations/:nameGets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
permissions
- GETLists a file's or shared drive's permissions
/files/:fileId/permissions?includePermissionsForView=string&pageSize=0&pageToken=string&supportsAllDrives=true&supportsTeamDrives=true&useDomainAdminAccess=trueLists a file's or shared drive's permissions. For more information, see Share files, folders, and drives. - POSTCreates a permission for a file or shared drive
/files/:fileId/permissions?emailMessage=string&enforceExpansiveAccess=true&enforceSingleParent=true&moveToNewOwnersRoot=true&sendNotificationEmail=true&supportsAllDrives=true&supportsTeamDrives=true&transferOwnership=true&useDomainAdminAccess=trueCreates a permission for a file or shared drive. For more information, see Share files, folders, and drives. Warning: Concurrent permission modifications… - GETGets a permission by ID
/files/:fileId/permissions/:permissionId?supportsAllDrives=true&supportsTeamDrives=true&useDomainAdminAccess=trueGets a permission by ID. For more information, see Share files, folders, and drives. - DELETEDeletes a permission
/files/:fileId/permissions/:permissionId?enforceExpansiveAccess=true&supportsAllDrives=true&supportsTeamDrives=true&useDomainAdminAccess=trueDeletes a permission. For more information, see Share files, folders, and drives. Warning: Concurrent permission modifications (such as update or delete) on… - PATCHUpdates a permission with patch semantics
/files/:fileId/permissions/:permissionId?enforceExpansiveAccess=true&removeExpiration=true&supportsAllDrives=true&supportsTeamDrives=true&transferOwnership=true&useDomainAdminAccess=trueUpdates a permission with patch semantics. For more information, see Share files, folders, and drives. Warning: Concurrent permission modifications (such as…
replies
- GETLists a comment's replies
/files/:fileId/comments/:commentId/replies?includeDeleted=true&pageSize=0&pageToken=stringLists a comment's replies. For more information, see Manage comments and replies. - POSTCreates a reply to a comment
/files/:fileId/comments/:commentId/repliesCreates a reply to a comment. For more information, see Manage comments and replies. - GETGets a reply by ID
/files/:fileId/comments/:commentId/replies/:replyId?includeDeleted=trueGets a reply by ID. For more information, see Manage comments and replies. - DELETEDeletes a reply
/files/:fileId/comments/:commentId/replies/:replyIdDeletes a reply. For more information, see Manage comments and replies. - PATCHUpdates a reply with patch semantics
/files/:fileId/comments/:commentId/replies/:replyIdUpdates a reply with patch semantics. For more information, see Manage comments and replies.
revisions
- GETGets a revision's metadata or content by ID
/files/:fileId/revisions/:revisionId?acknowledgeAbuse=trueGets a revision's metadata or content by ID. For more information, see Manage file revisions. - DELETEPermanently deletes a file version
/files/:fileId/revisions/:revisionIdPermanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other… - PATCHUpdates a revision with patch semantics
/files/:fileId/revisions/:revisionIdUpdates a revision with patch semantics. For more information, see Manage file revisions. - GETLists a file's revisions
/files/:fileId/revisions?pageSize=0&pageToken=stringLists a file's revisions. For more information, see Manage file revisions. Important: The list of revisions returned by this method might be incomplete for…
teamdrives
- GETDeprecated: Use `drives.list` instead.
/teamdrives?pageSize=0&pageToken=string&q=string&useDomainAdminAccess=trueDeprecated: Use drives.list instead. - POSTDeprecated: Use `drives.create` instead.
/teamdrives?requestId=stringDeprecated: Use drives.create instead. - GETDeprecated: Use `drives.get` instead.
/teamdrives/:teamDriveId?useDomainAdminAccess=trueDeprecated: Use drives.get instead. - DELETEDeprecated: Use `drives.delete` instead.
/teamdrives/:teamDriveIdDeprecated: Use drives.delete instead. - PATCHDeprecated: Use `drives.update` instead.
/teamdrives/:teamDriveId?useDomainAdminAccess=trueDeprecated: Use drives.update instead.
API details
- Base URL
https://www.googleapis.com/drive/v3- Authentication
- OAuth 2.0 (authorization code flow) with 10 scopes
An API key in the key query parameter - Operations
- 64 operations on 44 pathsGET 28POST 21DELETE 8PATCH 7
- Main resources
- files 14approvals 8drives 7comments 5permissions 5replies 5teamdrives 5revisions 4accessproposals 3changes 3
- Response formats
application/json- Description format
- Google API Discovery, API version
v3 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Google Drive API (all endpoints) in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Google Drive API (all endpoints) collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 10 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Gets information about the user, the user's Drive, and system capabilities” (GET /about), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Google Drive API (all endpoints)?
The Google Drive API allows clients to access resources from Google Drive. It is listed under Productivity & workspace and has 64 endpoints.
Who publishes the Google Drive API (all endpoints)?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Google Drive API (all endpoints)?
Requests go to https://www.googleapis.com/drive/v3. Endpoint paths are added to this base URL.
How do I authenticate with the Google Drive API (all endpoints)?
It accepts 2 methods: OAuth 2.0 (authorization code flow) with 10 scopes; an API key in the key query parameter.
How many endpoints does the Google Drive API (all endpoints) have?
64 operations on 44 paths (28 GET, 21 POST, 8 DELETE, 7 PATCH). The largest groups are files, approvals, drives, comments.
Is forking the Google Drive API (all endpoints) free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.