Google Drive SDK

Files

Methods

get
Gets a file's metadata by ID. To download a file's content, send an authorized HTTP GET request to the file's downloadUrl.
insert
Inserts a file, and any settable metadata or blob content sent with the request.
patch
Updates file metadata and/or content. This method supports patch semantics.
update
Updates file metadata and/or content.

Resource Representations

{
  "kind": "drive#file",
  "id": string,
  "etag": etag,
  "selfLink": string,
  "title": string,
  "mimeType": string,
  "description": string,
  "labels": {
    "starred": boolean,
    "hidden": boolean,
    "trashed": boolean
  },
  "createdDate": datetime,
  "modifiedDate": datetime,
  "modifiedByMeDate": datetime,
  "lastViewedDate": datetime,
  "parentsCollection": [
    {
      "id": string,
      "parentLink": string
    }
  ],
  "downloadUrl": string,
  "indexableText": {
    "text": string
  },
  "userPermission": {
    "kind": "drive#permission",
    "etag": etag,
    "role": string,
    "additionalRoles": [
      string
    ],
    "type": string
  },
  "fileExtension": string,
  "md5Checksum": string,
  "fileSize": long
}
Property Name Value Description Notes
kind string The type of file. This is always drive#file.
id string The ID of the file.
etag etag ETag of the file.
title string The title of the this file. Used to identify file or folder name.
mimeType string The MIME type of the file.
description string A short description of the file.
labels object Labels for the file.
labels.starred boolean Whether this file is starred by the user.
labels.hidden boolean Whether this file is hidden from the user.
labels.trashed boolean Whether this file has been trashed.
createdDate datetime Create time for this file (formatted ISO8601 timestamp).
modifiedDate datetime Last time this file was modified by anyone (formatted RFC 3339 timestamp).
modifiedByMeDate datetime Last time this file was modified by the currently authenticated user (formatted RFC 3339 timestamp).
lastViewedDate datetime Last time this file was viewed by anyone (formatted RFC 3339 timestamp).
downloadUrl string Short lived download URL for the file. This is only populated for files with content stored in Drive.
indexableText object Indexable text attributes for the file.  This property can only be written, and is not returned by files.get. For more information, see Saving indexable text.
indexableText.text string The text to be indexed for this file.
parentsCollection[] list Collection of parent folders which contain this file. On insert, setting this field puts the file in all of the provided folders. If no folders are provided, the file is placed in the default root folder. On update, this field is ignored.
parentsCollection[].id string The ID of the parent folder.
userPermission nested object The permissions for the authenticated user on this file.
userPermission.kind string The type of object.  Always drive#permission.
userPermission.etag etag ETag of the permission.
userPermission.role string The user's role for the document. Either owner, reader, or writer.
userPermission.additionalRoles[] list Additional roles for the user. May be commenter
userPermission.type string Type of permission.  Currently always user.
fileExtension string The file extension used when downloading this file. This field is read only. To set the extension, include it on title when creating the file. This is populated only for files with content stored in Drive.
md5Checksum string An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
fileSize long The size of the file in bytes. This is populated only for files with content stored in Drive.

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.