The Google Drive API allows clients to access resources from Google Drive.
- REST Resource: v2.about
- REST Resource: v2.apps
- REST Resource: v2.changes
- REST Resource: v2.channels
- REST Resource: v2.children
- REST Resource: v2.comments
- REST Resource: v2.drives
- REST Resource: v2.files
- REST Resource: v2.parents
- REST Resource: v2.permissions
- REST Resource: v2.properties
- REST Resource: v2.replies
- REST Resource: v2.revisions
Service: googleapis.com/drive/v2
To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.
Discovery document
A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:
Service endpoint
A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:
- https://www.googleapis.com
REST Resource: v2.about
| Methods | |
|---|---|
| get | GET /drive/v2/aboutGets the information about the current user along with Drive API settings | 
REST Resource: v2.apps
| Methods | |
|---|---|
| get | GET /drive/v2/apps/{appId}Gets a specific app. | 
| list | GET /drive/v2/appsLists a user's installed apps. | 
REST Resource: v2.changes
| Methods | |
|---|---|
| get | GET /drive/v2/changes/{changeId}Deprecated: Use changes.getStartPageTokenandchanges.listto retrieve recent changes. | 
| getStartPageToken | GET /drive/v2/changes/startPageTokenGets the starting pageToken for listing future changes. | 
| list | GET /drive/v2/changesLists the changes for a user or shared drive. | 
| watch | POST /drive/v2/changes/watchSubscribe to changes for a user. | 
REST Resource: v2.channels
| Methods | |
|---|---|
| stop | POST /drive/v2/channels/stopStops watching resources through this channel. | 
REST Resource: v2.children
| Methods | |
|---|---|
| delete | DELETE /drive/v2/files/{folderId}/children/{childId}Removes a child from a folder. | 
| get | GET /drive/v2/files/{folderId}/children/{childId}Gets a specific child reference. | 
| insert | POST /drive/v2/files/{folderId}/childrenInserts a file into a folder. | 
| list | GET /drive/v2/files/{folderId}/childrenLists a folder's children. | 
REST Resource: v2.comments
| Methods | |
|---|---|
| delete | DELETE /drive/v2/files/{fileId}/comments/{commentId}Deletes a comment. | 
| get | GET /drive/v2/files/{fileId}/comments/{commentId}Gets a comment by ID. | 
| insert | POST /drive/v2/files/{fileId}/commentsCreates a new comment on the given file. | 
| list | GET /drive/v2/files/{fileId}/commentsLists a file's comments. | 
| patch | PATCH /drive/v2/files/{fileId}/comments/{commentId}Updates an existing comment. | 
| update | PUT /drive/v2/files/{fileId}/comments/{commentId}Updates an existing comment. | 
REST Resource: v2.drives
| Methods | |
|---|---|
| delete | DELETE /drive/v2/drives/{driveId}Permanently deletes a shared drive for which the user is an organizer. | 
| get | GET /drive/v2/drives/{driveId}Gets a shared drive's metadata by ID. | 
| hide | POST /drive/v2/drives/{driveId}/hideHides a shared drive from the default view. | 
| insert | POST /drive/v2/drivesCreates a new shared drive. | 
| list | GET /drive/v2/drivesLists the user's shared drives. | 
| unhide | POST /drive/v2/drives/{driveId}/unhideRestores a shared drive to the default view. | 
| update | PUT /drive/v2/drives/{driveId}Updates the metadata for a shared drive. | 
REST Resource: v2.files
| Methods | |
|---|---|
| copy | POST /drive/v2/files/{fileId}/copyCreates a copy of the specified file. | 
| delete | DELETE /drive/v2/files/{fileId}Permanently deletes a file owned by the user without moving it to the trash. | 
| emptyTrash | DELETE /drive/v2/files/trashPermanently deletes all of the user's trashed files. | 
| export | GET /drive/v2/files/{fileId}/exportExports a Google Workspace document to the requested MIME type and returns exported byte content. | 
| generateIds | GET /drive/v2/files/generateIdsGenerates a set of file IDs which can be provided in insert or copy requests. | 
| get | GET /drive/v2/files/{fileId}Gets a file's metadata or content by ID. | 
| insert | POST /drive/v2/filesPOST /upload/drive/v2/filesInserts a new file. | 
| list | GET /drive/v2/filesLists the user's files. | 
| listLabels | GET /drive/v2/files/{fileId}/listLabelsLists the labels on a file. | 
| modifyLabels | POST /drive/v2/files/{fileId}/modifyLabelsModifies the set of labels applied to a file. | 
| patch | PATCH /drive/v2/files/{fileId}Updates a file's metadata and/or content. | 
| touch | POST /drive/v2/files/{fileId}/touchSet the file's updated time to the current server time. | 
| trash | POST /drive/v2/files/{fileId}/trashMoves a file to the trash. | 
| untrash | POST /drive/v2/files/{fileId}/untrashRestores a file from the trash. | 
| update | PUT /drive/v2/files/{fileId}PUT /upload/drive/v2/files/{fileId}Updates a file's metadata and/or content. | 
| watch | POST /drive/v2/files/{fileId}/watchSubscribes to changes to a file. | 
REST Resource: v2.parents
| Methods | |
|---|---|
| delete | DELETE /drive/v2/files/{fileId}/parents/{parentId}Removes a parent from a file. | 
| get | GET /drive/v2/files/{fileId}/parents/{parentId}Gets a specific parent reference. | 
| insert | POST /drive/v2/files/{fileId}/parentsAdds a parent folder for a file. | 
| list | GET /drive/v2/files/{fileId}/parentsLists a file's parents. | 
REST Resource: v2.permissions
| Methods | |
|---|---|
| delete | DELETE /drive/v2/files/{fileId}/permissions/{permissionId}Deletes a permission from a file or shared drive. | 
| get | GET /drive/v2/files/{fileId}/permissions/{permissionId}Gets a permission by ID. | 
| getIdForEmail | GET /drive/v2/permissionIds/{email}Returns the permission ID for an email address. | 
| insert | POST /drive/v2/files/{fileId}/permissionsInserts a permission for a file or shared drive. | 
| list | GET /drive/v2/files/{fileId}/permissionsLists a file's or shared drive's permissions. | 
| patch | PATCH /drive/v2/files/{fileId}/permissions/{permissionId}Updates a permission using patch semantics. | 
| update | PUT /drive/v2/files/{fileId}/permissions/{permissionId}Updates a permission. | 
REST Resource: v2.properties
| Methods | |
|---|---|
| delete | DELETE /drive/v2/files/{fileId}/properties/{propertyKey}Deletes a property. | 
| get | GET /drive/v2/files/{fileId}/properties/{propertyKey}Gets a property by its key. | 
| insert | POST /drive/v2/files/{fileId}/propertiesAdds a property to a file, or updates it if it already exists. | 
| list | GET /drive/v2/files/{fileId}/propertiesLists a file's properties. | 
| patch | PATCH /drive/v2/files/{fileId}/properties/{propertyKey}Updates a property. | 
| update | PUT /drive/v2/files/{fileId}/properties/{propertyKey}Updates a property. | 
REST Resource: v2.replies
| Methods | |
|---|---|
| delete | DELETE /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}Deletes a reply. | 
| get | GET /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}Gets a reply. | 
| insert | POST /drive/v2/files/{fileId}/comments/{commentId}/repliesCreates a new reply to the given comment. | 
| list | GET /drive/v2/files/{fileId}/comments/{commentId}/repliesLists all of the replies to a comment. | 
| patch | PATCH /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}Updates an existing reply. | 
| update | PUT /drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}Updates an existing reply. | 
REST Resource: v2.revisions
| Methods | |
|---|---|
| delete | DELETE /drive/v2/files/{fileId}/revisions/{revisionId}Permanently deletes a file version. | 
| get | GET /drive/v2/files/{fileId}/revisions/{revisionId}Gets a specific revision. | 
| list | GET /drive/v2/files/{fileId}/revisionsLists a file's revisions. | 
| patch | PATCH /drive/v2/files/{fileId}/revisions/{revisionId}Updates a revision. | 
| update | PUT /drive/v2/files/{fileId}/revisions/{revisionId}Updates a revision. |