Google Drive SDK

API Reference

This API reference is organized by resource type. Each resource type has one or more data representations and one or more methods.

Resource types

  1. Files
  2. About
  3. Changes
  4. Children
  5. Parents
  6. Permissions
  7. Revisions
  8. Apps
  9. Comments
  10. Replies
  11. Properties
  12. Channels
  13. Realtime

Files

For Files Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
copy POST  /files/fileId/copy Creates a copy of the specified file.
delete DELETE  /files/fileId Permanently deletes a file by ID. Skips the trash.
get GET  /files/fileId Gets a file's metadata by ID.
insert POST
https://www.googleapis.com/upload/drive/v2/files

and
POST  /files
Insert a new file.
list GET  /files Lists the user's files.
patch PATCH  /files/fileId Updates file metadata. This method supports patch semantics.
touch POST  /files/fileId/touch Set the file's updated time to the current server time.
trash POST  /files/fileId/trash Moves a file to the trash.
untrash POST  /files/fileId/untrash Restores a file from the trash.
update PUT
https://www.googleapis.com/upload/drive/v2/files/fileId

and
PUT  /files/fileId
Updates file metadata and/or content.
watch POST  /files/fileId/watch Start watching for changes to a file.

About

For About Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
get GET  /about Gets the information about the current user along with Drive API settings

Changes

For Changes Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
get GET  /changes/changeId Gets a specific change.
list GET  /changes Lists the changes for a user.
watch POST  /changes/watch Watch for all changes to a user's Drive.

Children

For Children Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
delete DELETE  /files/folderId/children/childId Removes a child from a folder.
get GET  /files/folderId/children/childId Gets a specific child reference.
insert POST  /files/folderId/children Inserts a file into a folder.
list GET  /files/folderId/children Lists a folder's children. To list all children of the root folder, use the alias root for the folderId value.

Parents

For Parents Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
delete DELETE  /files/fileId/parents/parentId Removes a parent from a file.
get GET  /files/fileId/parents/parentId Gets a specific parent reference.
insert POST  /files/fileId/parents Adds a parent folder for a file.
list GET  /files/fileId/parents Lists a file's parents.

Permissions

For Permissions Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
delete DELETE  /files/fileId/permissions/permissionId Deletes a permission from a file.
get GET  /files/fileId/permissions/permissionId Gets a permission by ID.
getIdForEmail GET  /permissionIds/email Returns the permission ID for an email address.
insert POST  /files/fileId/permissions Inserts a permission for a file.
list GET  /files/fileId/permissions Lists a file's permissions.
patch PATCH  /files/fileId/permissions/permissionId Updates a permission. This method supports patch semantics.
update PUT  /files/fileId/permissions/permissionId Updates a permission.

Revisions

For Revisions Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
delete DELETE  /files/fileId/revisions/revisionId Removes a revision.
get GET  /files/fileId/revisions/revisionId Gets a specific revision.
list GET  /files/fileId/revisions Lists a file's revisions.
patch PATCH  /files/fileId/revisions/revisionId Updates a revision. This method supports patch semantics.
update PUT  /files/fileId/revisions/revisionId Updates a revision.

Apps

For Apps Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
get GET  /apps/appId Gets a specific app.
list GET  /apps Lists a user's installed apps.

Comments

For Comments Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
delete DELETE  /files/fileId/comments/commentId Deletes a comment.
get GET  /files/fileId/comments/commentId Gets a comment by ID.
insert POST  /files/fileId/comments Creates a new comment on the given file.
list GET  /files/fileId/comments Lists a file's comments.
patch PATCH  /files/fileId/comments/commentId Updates an existing comment. This method supports patch semantics.
update PUT  /files/fileId/comments/commentId Updates an existing comment.

Replies

For Replies Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
delete DELETE  /files/fileId/comments/commentId/replies/replyId Deletes a reply.
get GET  /files/fileId/comments/commentId/replies/replyId Gets a reply.
insert POST  /files/fileId/comments/commentId/replies Creates a new reply to the given comment.
list GET  /files/fileId/comments/commentId/replies Lists all of the replies to a comment.
patch PATCH  /files/fileId/comments/commentId/replies/replyId Updates an existing reply. This method supports patch semantics.
update PUT  /files/fileId/comments/commentId/replies/replyId Updates an existing reply.

Properties

For Properties Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
delete DELETE  /files/fileId/properties/propertyKey Deletes a property.
get GET  /files/fileId/properties/propertyKey Gets a property by its key.
insert POST  /files/fileId/properties Adds a property to a file.
list GET  /files/fileId/properties Lists a file's properties.
patch PATCH  /files/fileId/properties/propertyKey Updates a property. This method supports patch semantics.
update PUT  /files/fileId/properties/propertyKey Updates a property.

Channels

For Channels Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
stop POST  /channels/stop Stop watching for changes to a resource.

Realtime

For Realtime Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/drive/v2, unless otherwise noted
get GET  /files/fileId/realtime Exports the contents of the Realtime API data model associated with this file as JSON.
update PUT
https://www.googleapis.com/upload/drive/v2/files/fileId/realtime
Overwrites the Realtime API data model associated with this file with the provided JSON data model.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.