JSON Reference

When a user selects one or more files, the Google Picker API returns a JSON-formatted object. Depending on the view from which the selection was made, different fields are included in this data object.

JSON representation
{
  Response.ACTION: action,
  Response.VIEW: [
    view_id,
    undefined,
    view_options {
      query: user_query,
      parent: parent_ID,
      ...
    }
  ],
  Response.DOCUMENTS: [
    {
      Document.DESCRIPTION: description,
      Document.DURATION: duration,
      Document.EMBEDDABLE_URL: embed_URL,
      Document.ICON_URL: icon_URL,
      Document.ID: item_id,
      Document.IS_NEW: is_new,
      Document.LAST_EDITED_UTC: timestamp,
      Document.MIME_TYPE: MIME_type,
      Document.NAME: item_name,
      Document.PARENT_ID: parent_ID,
        {
          type: phone_type,
          number: phone_number,
        }
        ...
      ],
      Document.SERVICE_ID: service_id,
      Document.THUMBNAILS: [
        {
          Thumbnail.URL: thumbnail_URL,
          Thumbnail.WIDTH: thumbnail_width,
          Thumbnail.HEIGHT: thumbnail_height
        }
        ...
      ],
      Document.TYPE: type,
      Document.URL: item_URL
    },
    ...
  ],
  Response.PARENTS: [
    {
      Document.DESCRIPTION: description,
      Document.LAST_EDITED_UTC: timestamp,
      Document.MIME_TYPE: MIME_type,
      Document.NAME: item_name,
      Document.ICON_URL: icon_URL,
      Document.ID: item_ID,
      Document.IS_NEW: is_new,
      Document.SERVICE_ID: service_id,
      Document.THUMBNAILS: [
        {
          Thumbnail.URL: thumbnail_URL,
          Thumbnail.WIDTH: thumbnail_width,
          Thumbnail.HEIGHT: thumbnail_height
        }
        ...
      ],
      Document.TYPE: type,
      Document.URL: item_URL,
    },
    ...
  ]
}
Fields
actionThe Action taken by the user to close the Google Picker dialog.
descriptionA description of the item, if provided.
durationThe duration of the selected video.
embed_URLA URL for an embeddable version of the item.
icon_URLA URL for a publicly accessible version for an icon, if available.
is_newTrue if the selected item was uploaded then immediately selected.
item_URLA URL linking directly to the item.
item_idID of the selected item.
item_nameName of the selected item.
MIME_typeThe MIME type of the selected item (not valid for maps).
parent_IDID of parent item, if applicable.
service_idA ServiceId that describes the service this file was picked from.
thumbnail_heightThe height of the publicly accessible thumbnail.
thumbnail_URLA URL for the publicly accessible thumbnail.
thumbnail_widthThe width of the publicly accessible thumbnail.
timestampThe number of milliseconds since January 1, 1970, 00:00:00 GMT.
typeThe Type of the selected item.
user_queryQuery string, if one was set in View.setQuery().
view_IDThe ViewId of the View the item was selected from.
view_optionsAdditional information, if known. Otherwise undefined.