Google Drive

Google Drive allows users to store files on their servers, synchronize files across devices, and share files. This integration helps you to create a new drive, query past activity and view change logs performed by the users. This integration was integrated and tested majorly with G Suite Basic and Enterprise edition.

Configure Service Account for Google Drive#

  1. Go to https://console.developers.google.com.

  2. Select or create a project:

    Setup Account

  1. Enable the Google Drive and Drive Activity API:

    1. Under the main menu, select APIs & Services -> 'Libary': Setup Account

    2. Enable Google Drive API: Setup Account

    3. Enable Drive Activity API: Setup Account

    4. Select the project and click 'OPEN': Setup Account

  2. Create a service account with correct restricted permissions:

    1. Under the main menu, select IAM & Admin -> Service Accounts: Setup Account

    2. In the top bar, select CREATE SERVICE ACCOUNT: Setup Account

    3. Under the main menu, select IAM & Admin -> Service Accounts and open the account you just created.

    4. Generate new credentials:

      1. On the Service account details page, under Keys, click ADD KEY and select Create new key: Setup Account

      2. Under Key type, select JSON, and click CREATE. Save the credentials in a secure location. You will need the generated credentials.json file when you configure the instance in Cortex XSOAR: Setup Account

Add Scopes in G Suite Admin#

  1. Go to https://admin.google.com

  2. Click Menu and select Security -> API Controls: Setup Account

  3. Under Domain wide delegation tab, Click MANAGE DOMAIN WIDE DELEGATION: Setup Account

  4. Click on Add new and the window will prompt, enter Client ID from your credentials.json and required scopes from integration tips. Setup Account

  5. Click AUTHORIZE.

Configure Google Drive on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.

  2. Search for Google Drive.

  3. Click Add instance to create and configure a new integration instance.

    ParameterDescriptionRequired
    isFetchFetch incidents.False
    user_service_account_jsonUser's Service Account JSON.True
    user_idUser ID.False
    action_detail_case_includeAction Detail Case Include.False
    drive_item_search_fieldDrive Item Search Field.False
    drive_item_search_valueDrive Item Search Value.False
    max_fetchMax Incidents.False
    first_fetchFirst fetch time interval.False
    incidentTypeIncident type.False
    insecureTrust any certificate (not secure).False
    proxyUse system proxy settings.False
  4. Click Test to validate the URLs, token, and connection.

Commands#

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

google-drive-create#


Creates a new Team Drive. The name argument specifies the name of the Team Drive. The specified user will be the first organizer. This shared drive/team drive feature is available only with G Suite Enterprise, Enterprise for Education, G Suite Essentials, Business, Education, and Nonprofits edition.

Base Command#

google-drive-create

Input#

Argument NameDescriptionRequired
user_idThe user's primary email address.Optional
nameThe name of this shared drive.Required
hiddenWhether the shared drive is hidden from default view.Optional

Context Output#

PathTypeDescription
GoogleDrive.Drive.kindStringIdentifies what kind of resource this is.
GoogleDrive.Drive.idStringThe ID of this shared drive which is also the ID of the top level folder of this shared drive.
GoogleDrive.Drive.nameStringThe name of this shared drive.
GoogleDrive.Drive.hiddenBooleanWhether the shared drive is hidden from default view.

Command Example#

!google-drive-create name=drive1

Context Example#

{
"GoogleDrive": {
"Drive": {
"kind": "drive#drive",
"id": "YYg1BVyzlZx",
"name": "drive1",
"hidden": true
}
}
}

Human Readable Output#

A new shared drive created.#

IdNameHidden
YYg1BVyzlZxdrive1true

google-drive-changes-list#


Lists the changes for a user or shared drive.

Base Command#

google-drive-changes-list

Input#

Argument NameDescriptionRequired
page_tokenThe token for continuing a previous list request on the next page.Required
user_idThe user's primary email address.Optional
drive_idThe shared drive from which changes are returned.Optional
include_corpus_removalsWhether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. Default is "false".Optional
include_items_from_all_drivesWhether both My Drive and shared drive items should be included in results. Default is "false".Optional
include_permissions_for_viewSpecifies which additional view's permissions to include in the response. Only 'published' is supported.Optional
include_removedWhether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. Default is "true".Optional
page_sizeThe maximum number of changes to return per page. Acceptable values are 1 to 1000, inclusive. Default is "100".Optional
restrict_to_my_driveWhether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive. Default is "false".Optional
spacesA comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Default is "false".Optional
fieldsThe paths of the fields you want to be included in the response. Possible values are: ""basic" (the response will include a default set of fields specific to this method) and "advance" (you can use the value * to return all the fields). Default is "basic".Optional

Context Output#

PathTypeDescription
GoogleDrive.PageToken.DriveChange.nextPageTokenStringThe page token for the next page of changes.
GoogleDrive.PageToken.DriveChange.newStartPageTokenStringThe starting page token for future changes.
GoogleDrive.PageToken.DriveChange.driveIdStringThe ID of the shared drive associated with this change.
GoogleDrive.PageToken.DriveChange.userIdStringThe user's primary email address.
GoogleDrive.DriveChange.userIdStringThe user's primary email address.
GoogleDrive.DriveChange.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.changeTypeStringThe type of the change. Possible values are file and drive.
GoogleDrive.DriveChange.timeDateThe time of this change (RFC 3339 date-time).
GoogleDrive.DriveChange.removedBooleanWhether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access.
GoogleDrive.DriveChange.fileIdStringThe ID of the file which has changed.
GoogleDrive.DriveChange.driveIdStringThe ID of the shared drive associated with this change.
GoogleDrive.DriveChange.file.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.idStringThe ID of the file.
GoogleDrive.DriveChange.file.nameStringThe name of the file.
GoogleDrive.DriveChange.file.mimeTypeStringThe MIME type of the file.
GoogleDrive.DriveChange.file.descriptionStringA short description of the file.
GoogleDrive.DriveChange.file.starredBooleanWhether the user has starred the file.
GoogleDrive.DriveChange.file.trashedBooleanWhether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file.
GoogleDrive.DriveChange.file.explicitlyTrashedBooleanWhether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
GoogleDrive.DriveChange.file.trashingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.trashingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.trashingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.trashingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.trashingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.trashingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.trashedTimeDateThe time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
GoogleDrive.DriveChange.file.parentsUnknownThe IDs of the parent folders which contain the file.
GoogleDrive.DriveChange.file.propertiesUnknownA collection of arbitrary key-value pairs which are visible to all apps.
GoogleDrive.DriveChange.file.appPropertiesUnknownA collection of arbitrary key-value pairs which are private to the requesting app.
GoogleDrive.DriveChange.file.spacesUnknowsThe list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.
GoogleDrive.DriveChange.file.versionNumberA monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
GoogleDrive.DriveChange.file.webContentLinkStringA link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
GoogleDrive.DriveChange.file.webViewLinkStringA link for opening the file in a relevant Google editor or viewer in a browser.
GoogleDrive.DriveChange.file.iconLinkStringA static, unauthenticated link to the file's icon.
GoogleDrive.DriveChange.file.hasThumbnailBooleanWhether this file has a thumbnail.
GoogleDrive.DriveChange.file.thumbnailLinkStringA short-lived link to the file's thumbnail, if available.
GoogleDrive.DriveChange.file.thumbnailVersionNumberThe thumbnail version for use in thumbnail cache invalidation.
GoogleDrive.DriveChange.file.viewedByMeBooleanWhether the file has been viewed by this user.
GoogleDrive.DriveChange.file.viewedByMeTimeDateThe last time the file was viewed by the user (RFC 3339 date-time).
GoogleDrive.DriveChange.file.createdTimeDateThe time at which the file was created (RFC 3339 date-time).
GoogleDrive.DriveChange.file.modifiedTimeDateThe last time the file was modified by anyone (RFC 3339 date-time).
GoogleDrive.DriveChange.file.modifiedByMeTimeDateThe last time the file was modified by the user (RFC 3339 date-time).
GoogleDrive.DriveChange.file.modifiedByMeBooleanWhether the file has been modified by this user.
GoogleDrive.DriveChange.file.sharedWithMeTimeDateThe time at which the file was shared with the user, if applicable (RFC 3339 date-time).
GoogleDrive.DriveChange.file.sharingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.sharingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.sharingUser.photoLinkDateA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.sharingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.sharingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.sharingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.owners.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.owners.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.owners.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.owners.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.owners.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.owners.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.driveIdStringID of the shared drive the file resides in. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.lastModifyingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.lastModifyingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.lastModifyingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.lastModifyingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.lastModifyingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.lastModifyingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.sharedBooleanWhether the file has been shared. Not populated for items in shared drives.
GoogleDrive.DriveChange.file.ownedByMeBooleanWhether the user owns the file. Not populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canAddChildrenBooleanWhether the current user can add children to this folder. This is always false when the item is not a folder.
GoogleDrive.DriveChange.file.capabilities.canAddFolderFromAnotherDriveBooleanWhether the current user can add a folder from another drive (different shared drive or My Drive) to this folder.
GoogleDrive.DriveChange.file.capabilities.canAddMyDriveParentBooleanWhether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
GoogleDrive.DriveChange.file.capabilities.canChangeCopyRequiresWriterPermissionBooleanWhether the current user can change the copyRequiresWriterPermission restriction of this file.
GoogleDrive.DriveChange.file.capabilities.canCommentBooleanWhether the current user can comment on this file.
GoogleDrive.DriveChange.file.capabilities.canCopyBooleanWhether the current user can copy this file.
GoogleDrive.DriveChange.file.capabilities.canDeleteBooleanWhether the current user can delete this file.
GoogleDrive.DriveChange.file.capabilities.canDeleteChildrenBooleanWhether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canDownloadBooleanWhether the current user can download this file.
GoogleDrive.DriveChange.file.capabilities.canEditBooleanWhether the current user can edit this file.
GoogleDrive.DriveChange.file.capabilities.canListChildrenBooleanWhether the current user can list the children of this folder. This is always false when the item is not a folder.
GoogleDrive.DriveChange.file.capabilities.canModifyContentBooleanWhether the current user can modify the content of this file.
GoogleDrive.DriveChange.file.capabilities.canModifyContentRestrictionBooleanWhether the current user can modify restrictions on content of this file.
GoogleDrive.DriveChange.file.capabilities.canMoveChildrenOutOfDriveBooleanWhether the current user can move children of this folder outside of the shared drive.
GoogleDrive.DriveChange.file.capabilities.canMoveChildrenWithinDriveBooleanWhether the current user can move children of this folder within this drive.
GoogleDrive.DriveChange.file.capabilities.canMoveItemOutOfDriveBooleanWhether the current user can move this item outside of this drive by changing its parent.
GoogleDrive.DriveChange.file.capabilities.canMoveItemWithinDriveBooleanWhether the current user can move this item within this drive.
GoogleDrive.DriveChange.file.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of this file.
GoogleDrive.DriveChange.file.capabilities.canReadDriveBooleanWhether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canRemoveChildrenBooleanWhether the current user can remove children from this folder.
GoogleDrive.DriveChange.file.capabilities.canRemoveMyDriveParentBooleanWhether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
GoogleDrive.DriveChange.file.capabilities.canRenameBooleanWhether the current user can rename this file.
GoogleDrive.DriveChange.file.capabilities.canShareBooleanWhether the current user can modify the sharing settings for this file.
GoogleDrive.DriveChange.file.capabilities.canTrashBooleanWhether the current user can move this file to trash.
GoogleDrive.DriveChange.file.capabilities.canTrashChildrenBooleanWhether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canUntrashBooleanWhether the current user can restore this file from trash.
GoogleDrive.DriveChange.file.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download this file, should be disabled for readers and commenters.
GoogleDrive.DriveChange.file.writersCanShareBooleanWhether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.
GoogleDrive.DriveChange.file.permissions.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.permissions.idStringThe ID of this permission.
GoogleDrive.DriveChange.file.permissions.typeStringThe type of the grantee.
GoogleDrive.DriveChange.file.permissions.emailAddressStringThe email address of the user or group to which this permission refers.
GoogleDrive.DriveChange.file.permissions.domainStringThe domain to which this permission refers.
GoogleDrive.DriveChange.file.permissions.roleStringThe role granted by this permission.
GoogleDrive.DriveChange.file.permissions.viewStringIndicates the view for this permission.
GoogleDrive.DriveChange.file.permissions.allowFileDiscoveryBooleanWhether the permission allows the file to be discovered through search.
GoogleDrive.DriveChange.file.permissions.displayNameStringThe "pretty" name of the value of the permission.
GoogleDrive.DriveChange.file.permissions.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.permissions.expirationTimeDateThe time at which this permission will expire (RFC 3339 date-time).
GoogleDrive.DriveChange.file.permissions.permissionDetails.permissionTypeStringThe permission type for this user.
GoogleDrive.DriveChange.file.permissions.permissionDetails.roleStringThe primary role for this user.
GoogleDrive.DriveChange.file.permissions.permissionDetails.inheritedFromStringThe ID of the item from which this permission is inherited.
GoogleDrive.DriveChange.file.permissions.permissionDetails.inheritedBooleanWhether this permission is inherited.
GoogleDrive.DriveChange.file.permissions.deletedBooleanWhether the account associated with this permission has been deleted.
GoogleDrive.DriveChange.file.permissionIdsUnknownList of permission IDs for users with access to this file.
GoogleDrive.DriveChange.file.hasAugmentedPermissionsBooleanWhether there are permissions directly on this file. This field is only populated for items in shared drives.
GoogleDrive.DriveChange.file.folderColorRgbStringThe color for a folder as an RGB hex string.
GoogleDrive.DriveChange.file.originalFilenameStringThe original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
GoogleDrive.DriveChange.file.fullFileExtensionStringThe full file extension extracted from the name field.
GoogleDrive.DriveChange.file.fileExtensionStringThe final component of fullFileExtension. This is only available for files with binary content in Google Drive.
GoogleDrive.DriveChange.file.md5ChecksumStringThe MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
GoogleDrive.DriveChange.file.sizeNumberThe size of the file's content in bytes. This is only applicable to files with binary content in Google Drive.
GoogleDrive.DriveChange.file.quotaBytesUsedNumberThe number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
GoogleDrive.DriveChange.file.headRevisionIdStringThe ID of the file's head revision. This is currently only available for files with binary content in Google Drive.
GoogleDrive.DriveChange.file.contentHints.thumbnail.imageUnknownThe thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
GoogleDrive.DriveChange.file.contentHints.thumbnail.mimeTypeStringThe MIME type of the thumbnail.
GoogleDrive.DriveChange.file.contentHints.indexableTextStringText to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
GoogleDrive.DriveChange.file.imageMediaMetadata.widthNumberThe width of the image in pixels.
GoogleDrive.DriveChange.file.imageMediaMetadata.heightNumberThe height of the image in pixels.
GoogleDrive.DriveChange.file.imageMediaMetadata.rotationNumberThe number of clockwise 90 degree rotations applied from the image's original orientation.
GoogleDrive.DriveChange.file.imageMediaMetadata.location.latitudeNumberThe latitude stored in the image.
GoogleDrive.DriveChange.file.imageMediaMetadata.location.longitudeNumberThe longitude stored in the image.
GoogleDrive.DriveChange.file.imageMediaMetadata.location.altitudeNumberThe altitude stored in the image.
GoogleDrive.DriveChange.file.imageMediaMetadata.timeStringThe date and time the photo was taken (EXIF DateTime).
GoogleDrive.DriveChange.file.imageMediaMetadata.cameraMakeStringThe make of the camera used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.cameraModelStringThe model of the camera used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.exposureTimeNumberThe length of the exposure, in seconds.
GoogleDrive.DriveChange.file.imageMediaMetadata.apertureNumberThe aperture used to create the photo (f-number).
GoogleDrive.DriveChange.file.imageMediaMetadata.flashUsedBooleanWhether a flash was used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.focalLengthNumberThe focal length used to create the photo, in millimeters.
GoogleDrive.DriveChange.file.imageMediaMetadata.isoSpeedNumberThe ISO speed used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.meteringModeStringThe metering mode used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.sensorStringThe type of sensor used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.exposureModeStringThe exposure mode used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.colorSpaceStringThe color space of the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.whiteBalanceStringThe white balance mode used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.exposureBiasNumberThe exposure bias of the photo (APEX value).
GoogleDrive.DriveChange.file.imageMediaMetadata.maxApertureValueNumberThe smallest f-number of the lens at the focal length used to create the photo (APEX value).
GoogleDrive.DriveChange.file.imageMediaMetadata.subjectDistanceNumberThe distance to the subject of the photo, in meters.
GoogleDrive.DriveChange.file.imageMediaMetadata.lensStringThe lens used to create the photo.
GoogleDrive.DriveChange.file.videoMediaMetadata.widthNumberThe width of the video in pixels.
GoogleDrive.DriveChange.file.videoMediaMetadata.heightNumberThe height of the video in pixels.
GoogleDrive.DriveChange.file.videoMediaMetadata.durationMillisNumberThe duration of the video in milliseconds.
GoogleDrive.DriveChange.file.isAppAuthorizedBooleanWhether the file was created or opened by the requesting app.
GoogleDrive.DriveChange.file.exportLinksUnknownLinks for exporting Google Docs to specific formats.
GoogleDrive.DriveChange.file.shortcutDetails.targetIdStringThe ID of the file that this shortcut points to.
GoogleDrive.DriveChange.file.shortcutDetails.targetMimeTypeStringThe MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
GoogleDrive.DriveChange.file.contentRestrictions.readOnlyBooleanWhether the content of the file is read-only.
GoogleDrive.DriveChange.file.contentRestrictions.reasonStringReason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.contentRestrictions.restrictionTimeDateThe time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
GoogleDrive.DriveChange.file.contentRestrictions.typeStringThe type of the content restriction. Currently the only possible value is globalContentRestriction.
GoogleDrive.DriveChange.drive.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.drive.idStringThe ID of this shared drive which is also the ID of the top level folder of this shared drive.
GoogleDrive.DriveChange.drive.nameStringThe name of this shared drive.
GoogleDrive.DriveChange.drive.themeIdStringThe ID of the theme from which the background image and color will be set.
GoogleDrive.DriveChange.drive.colorRgbStringThe color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId.
GoogleDrive.DriveChange.drive.backgroundImageFile.idStringThe ID of an image file in Google Drive to use for the background image.
GoogleDrive.DriveChange.drive.backgroundImageFile.xCoordinateNumberThe X coordinate of the upper left corner of the cropping area in the background image.
GoogleDrive.DriveChange.drive.backgroundImageFile.yCoordinateNumberThe Y coordinate of the upper left corner of the cropping area in the background image.
GoogleDrive.DriveChange.drive.backgroundImageFile.widthNumberThe width of the cropped image in the closed range of 0 to 1.
GoogleDrive.DriveChange.drive.backgroundImageLinkStringA short-lived link to this shared drive's background image.
GoogleDrive.DriveChange.drive.capabilities.canAddChildrenBooleanWhether the current user can add children to folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeCopyRequiresWriterPermissionRestrictionBooleanWhether the current user can change the copyRequiresWriterPermission restriction of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeDomainUsersOnlyRestrictionBooleanWhether the current user can change the domainUsersOnly restriction of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeDriveBackgroundBooleanWhether the current user can change the background of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeDriveMembersOnlyRestrictionBooleanWhether the current user can change the driveMembersOnly restriction of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canCommentBooleanWhether the current user can comment on files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canCopyBooleanWhether the current user can copy files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canDeleteChildrenBooleanWhether the current user can delete children from folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canDeleteDriveBooleanWhether the current user can delete this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canDownloadBooleanWhether the current user can download files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canEditBooleanWhether the current user can edit files in this shared drive
GoogleDrive.DriveChange.drive.capabilities.canListChildrenBooleanWhether the current user can list the children of folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canManageMembersBooleanWhether the current user can add members to this shared drive or remove them or change their role.
GoogleDrive.DriveChange.drive.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canRenameBooleanWhether the current user can rename files or folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canRenameDriveBooleanWhether the current user can rename this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canShareBooleanWhether the current user can share files or folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canTrashChildrenBooleanWhether the current user can trash children from folders in this shared drive.
GoogleDrive.DriveChange.drive.createdTimeDateThe time at which the shared drive was created (RFC 3339 date-time).
GoogleDrive.DriveChange.drive.hiddenBooleanWhether the shared drive is hidden from default view.
GoogleDrive.DriveChange.drive.restrictions.adminManagedRestrictionsBooleanWhether administrative privileges on this shared drive are required to modify restrictions.
GoogleDrive.DriveChange.drive.restrictions.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters.
GoogleDrive.DriveChange.drive.restrictions.domainUsersOnlyBooleanWhether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs.
GoogleDrive.DriveChange.drive.restrictions.driveMembersOnlyBooleanWhether access to items inside this shared drive is restricted to its members.

Command Example#

!google-drive-changes-list page_token=485 user_id=user@domain.com fields=advance page_size=2

Context Example#

{
"GoogleDrive": {
"DriveChange": [
{
"changeType": "file",
"file": {
"capabilities": {
"canAddChildren": false,
"canAddMyDriveParent": false,
"canChangeCopyRequiresWriterPermission": true,
"canChangeViewersCanCopyContent": true,
"canComment": true,
"canCopy": true,
"canDelete": true,
"canDownload": true,
"canEdit": true,
"canListChildren": false,
"canModifyContent": true,
"canMoveChildrenWithinDrive": false,
"canMoveItemIntoTeamDrive": true,
"canMoveItemOutOfDrive": true,
"canMoveItemWithinDrive": true,
"canReadRevisions": true,
"canRemoveChildren": false,
"canRemoveMyDriveParent": true,
"canRename": true,
"canShare": true,
"canTrash": true,
"canUntrash": true
},
"copyRequiresWriterPermission": false,
"createdTime": "2020-09-18T16:44:58.481Z",
"explicitlyTrashed": false,
"fileExtension": "PNG",
"fullFileExtension": "PNG",
"hasThumbnail": true,
"headRevisionId": "0B4EoMKFUOWuTV1VRSU1xN3ZXSU5kRHZrcWVUZ0Nha0xVQ3FVPQ",
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/image/png",
"id": "1i_rViDYPnCJERqClTVXxgT2BlbBozvsl",
"imageMediaMetadata": {
"height": 629,
"rotation": 0,
"width": 1745
},
"isAppAuthorized": false,
"kind": "drive#file",
"lastModifyingUser": {
"displayName": "drive activity",
"emailAddress": "user@domain.com",
"kind": "drive#user",
"me": true,
"permissionId": "13917841530253496391"
},
"md5Checksum": "28364a0552ccfb6638d929fb31b15e18",
"mimeType": "image/png",
"modifiedByMe": true,
"modifiedByMeTime": "2020-08-29T05:18:45.000Z",
"modifiedTime": "2020-08-29T05:18:45.000Z",
"name": "ACL_list.PNG",
"originalFilename": "ACL_list.PNG",
"ownedByMe": true,
"owners": [
{
"displayName": "drive activity",
"emailAddress": "user@domain.com",
"kind": "drive#user",
"me": true,
"permissionId": "13917841530253496391"
}
],
"parents": [
"1qczzfFtukqOKTDDNRxhJrfUxlP99DKBp"
],
"permissionIds": [
"06693729183418228120",
"12910357923353950258k",
"13917841530253496391"
],
"permissions": [
{
"deleted": false,
"displayName": "Deval Mehta",
"emailAddress": "user1@domain.com",
"id": "06693729183418228120",
"kind": "drive#permission",
"role": "writer",
"type": "user"
},
{
"allowFileDiscovery": false,
"displayName": "Data Technologies",
"domain": "domain.com",
"id": "12910357923353950258k",
"kind": "drive#permission",
"role": "reader",
"type": "domain"
},
{
"deleted": false,
"displayName": "drive activity",
"emailAddress": "user@domain.com",
"id": "13917841530253496391",
"kind": "drive#permission",
"role": "owner",
"type": "user"
}
],
"quotaBytesUsed": "68787",
"shared": true,
"size": "68787",
"spaces": [
"drive"
],
"starred": false,
"thumbnailLink": "https://lh3.googleusercontent.com/DTeAOSDpqZsvunN1AnZh00Rko90=s220",
"thumbnailVersion": "1",
"trashed": false,
"version": "2",
"viewedByMe": true,
"viewedByMeTime": "2020-09-18T16:44:58.481Z",
"viewersCanCopyContent": true,
"webContentLink": "https://drive.google.com/uc?id=123&export=download",
"webViewLink": "https://drive.google.com/file/d/123/view?usp=drivesdk",
"writersCanShare": true
},
"fileId": "1i_rViDYPnCJERqClTVXxgT2BlbBozvsl",
"kind": "drive#change",
"removed": false,
"time": "2020-09-21T14:14:21.131Z",
"type": "file"
},
{
"changeType": "file",
"file": {
"capabilities": {
"canAddChildren": true,
"canAddMyDriveParent": false,
"canChangeCopyRequiresWriterPermission": false,
"canChangeViewersCanCopyContent": false,
"canComment": true,
"canCopy": false,
"canDelete": true,
"canDownload": true,
"canEdit": true,
"canListChildren": true,
"canModifyContent": true,
"canMoveChildrenWithinDrive": true,
"canMoveItemIntoTeamDrive": true,
"canMoveItemOutOfDrive": true,
"canMoveItemWithinDrive": true,
"canReadRevisions": false,
"canRemoveChildren": true,
"canRemoveMyDriveParent": true,
"canRename": true,
"canShare": true,
"canTrash": true,
"canUntrash": true
},
"copyRequiresWriterPermission": false,
"createdTime": "2020-09-21T14:16:35.836Z",
"explicitlyTrashed": false,
"folderColorRgb": "#8f8f8f",
"hasThumbnail": false,
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd123",
"id": "1i8dC0MGowqwg2IjGWs1CJekqZOn5X1mb",
"isAppAuthorized": false,
"kind": "drive#file",
"lastModifyingUser": {
"displayName": "drive activity",
"emailAddress": "user@domain.com",
"kind": "drive#user",
"me": true,
"permissionId": "13917841530253496391"
},
"mimeType": "application/vnd.google-apps.folder",
"modifiedByMe": true,
"modifiedByMeTime": "2020-09-21T14:16:35.836Z",
"modifiedTime": "2020-09-21T14:16:35.836Z",
"name": "Folder_2_move",
"ownedByMe": true,
"owners": [
{
"displayName": "drive activity",
"emailAddress": "user@domain.com",
"kind": "drive#user",
"me": true,
"permissionId": "13917841530253496391"
}
],
"parents": [
"0AIEoMKFUOWuTUk9PVA"
],
"permissionIds": [
"12910357923353950258k",
"13917841530253496391"
],
"permissions": [
{
"allowFileDiscovery": false,
"displayName": "Data Technologies",
"domain": "domain.com",
"id": "12910357923353950258k",
"kind": "drive#permission",
"role": "reader",
"type": "domain"
},
{
"deleted": false,
"displayName": "drive activity",
"emailAddress": "user@domain.com",
"id": "13917841530253496391",
"kind": "drive#permission",
"role": "owner",
"type": "user"
}
],
"quotaBytesUsed": "0",
"shared": true,
"spaces": [
"drive"
],
"starred": false,
"thumbnailVersion": "0",
"trashed": false,
"version": "2",
"viewedByMe": true,
"viewedByMeTime": "2020-09-21T14:16:35.836Z",
"viewersCanCopyContent": true,
"webViewLink": "https://drive.google.com/drive/folders/123",
"writersCanShare": true
},
"fileId": "1i8dC0MGowqwg2IjGWs1CJekqZOn5X1mb",
"kind": "drive#change",
"removed": false,
"time": "2020-09-21T14:16:36.333Z",
"type": "file"
}
],
"PageToken": {
"DriveChange": {
"nextPageToken": "489",
"userId": "user@domain.com"
}
}
}
}

Human Readable Output#

Next Page Token: 489#

Files(s)#

IdNameSize ( Bytes )Modified TimeLast Modifying User
1i_rViDYPnCJERqClTVXxgT2BlbBozvslACL_list.PNG687872020-08-29T05:18:45.000Zdrive activity
1i8dC0MGowqwg2IjGWs1CJekqZOn5X1mbFolder_2_move2020-09-21T14:16:35.836Zdrive activity

Drive(s)#

No entries.

google-drive-activity-list#


Query past activity in Google Drive.

Base Command#

google-drive-activity-list

Input#

Argument NameDescriptionRequired
user_idThe user's primary email address.Optional
folder_nameReturn activities for this Drive folder and all children and descendants. The format is "items/ITEM_ID".Optional
item_nameReturn activities for this Drive item. The format is "items/ITEM_ID".Optional
filterThe filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional "AND", where each expression is of the form "field operator value".

Supported fields:
time - Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format.
Examples:
time > 1452409200000 AND time <= 1492812924310
time >= "2016-01-10T01:02:03-05:00"

detail.action_detail_case - Uses the "has" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses.
Examples:
detail.action_detail_case: RENAME
detail.action_detail_case:(CREATE EDIT)
-detail.action_detail_case:MOVE"
Optional
time_rangeThe time range to consider for getting drive activity. Use the format "<number> <time unit>".
Example: 12 hours, 7 days, 3 months, 1 year. This argument will override if the filter argument is given.
Optional
action_detail_case_includeA singular value or a list of allowed action types enclosed in parentheses. Which filters based on given actions. Examples:
RENAME
(CREATE EDIT)
This argument will override if the filter argument is given.
Optional
action_detail_case_removeA singular value or a list of allowed action types enclosed in parentheses. Which filters based on given actions Examples:
RENAME
(CREATE EDIT)
This argument will override if the filter argument is given.
Optional
page_tokenThe token identifying which page of results to return. Set this to the nextPageToken value returned from a previous query to obtain the following page of results. If not set, the first page of results will be returned.Optional

Context Output#

PathTypeDescription
GoogleDrive.PageToken.DriveActivity.nextPageTokenStringToken to retrieve the next page of results, or empty if there are no more results in the list.
GoogleDrive.DriveActivity.primaryActionDetail.create.newBooleanIf true, the object was newly created.
GoogleDrive.DriveActivity.primaryActionDetail.create.uploadBooleanIf true, the object originated externally and was uploaded to Drive.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.primaryActionDetail.editBooleanIf true, the object was edited.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.driveFolder.typeStringThe type of a Drive folder.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.primaryActionDetail.rename.oldTitleStringThe previous title of the drive object.
GoogleDrive.DriveActivity.primaryActionDetail.rename.newTitleStringThe new title of the drive object.
GoogleDrive.DriveActivity.primaryActionDetail.delete.typeStringThe type of delete action taken.
GoogleDrive.DriveActivity.primaryActionDetail.restore.typeStringThe type of restore action taken.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g. in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.domain.nameStringThe name of the domain, e.g. "google.com".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g. in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.domain.nameStringThe name of the domain, e.g. "google.com".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.comment.post.subtypeStringThe sub-type of post event.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.subtypeStringThe sub-type of assignment event.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.comment.suggestion.subtypeStringThe sub-type of suggestion event.
GoogleDrive.DriveActivity.primaryActionDetail.dlpChange.typeStringThe type of Data Leak Prevention (DLP) change.
GoogleDrive.DriveActivity.primaryActionDetail.reference.typeStringThe reference type corresponding to this event.
GoogleDrive.DriveActivity.primaryActionDetail.settingsChange.restrictionChanges.featureStringThe feature which had a change in restriction policy.
GoogleDrive.DriveActivity.primaryActionDetail.settingsChange.restrictionChanges.newRestrictionStringThe restriction in place after the change.
GoogleDrive.DriveActivity.actors.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actors.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actors.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actors.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actors.anonymousBooleanIf true, the user is an anonymous user.
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.deletedUserBooleanIf true, A user whose account has since been deleted.
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.unknownUserBooleanIf true, A user about whom nothing is currently known.
GoogleDrive.DriveActivity.actors.system.typeStringThe type of the system event that may triggered activity.
GoogleDrive.DriveActivity.actors.administratorBooleanIf true, the user is an administrator.
GoogleDrive.DriveActivity.actions.detail.create.newBooleanIf true, the object was newly created.
GoogleDrive.DriveActivity.actions.detail.create.uploadBooleanIf true, the object originated externally and was uploaded to Drive.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.detail.editBooleanIf true, the object was edited.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.driveFolder.typeStringThe type of a Drive folder.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.detail.move.addedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.detail.move.removedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.detail.rename.oldTitleStringThe previous title of the drive object.
GoogleDrive.DriveActivity.actions.detail.rename.newTitleStringThe new title of the drive object.
GoogleDrive.DriveActivity.actions.detail.delete.typeStringThe type of delete action taken.
GoogleDrive.DriveActivity.actions.detail.restore.typeStringThe type of restore action taken.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g. in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g., in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.domain.nameStringThe name of the domain, e.g. "google.com".
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.comment.post.subtypeStringThe sub-type of post event.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.subtypeStringThe sub-type of assignment event.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.comment.suggestion.subtypeStringThe sub-type of suggestion event.
GoogleDrive.DriveActivity.actions.detail.dlpChange.typeStringThe type of Data Leak Prevention (DLP) change.
GoogleDrive.DriveActivity.actions.detail.reference.typeStringThe reference type corresponding to this event.
GoogleDrive.DriveActivity.actions.detail.settingsChange.restrictionChanges.featureStringThe feature which had a change in restriction policy.
GoogleDrive.DriveActivity.actions.detail.settingsChange.restrictionChanges.newRestrictionStringThe restriction in place after the change.
GoogleDrive.DriveActivity.actions.actor.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.actor.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.actor.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.actor.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.actor.anonymousBooleanIf true, the user is an anonymous user.
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.unknownUserStringIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.actor.system.typeStringThe type of the system event that may triggered activity.
GoogleDrive.DriveActivity.actions.actor.administratorBooleanIf true, the user is an administrator.
GoogleDrive.DriveActivity.actions.target.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.target.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.target.driveItem.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.domain.nameStringThe name of the domain, e.g. "google.com".
GoogleDrive.DriveActivity.actions.target.driveItem.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.driveItem.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.target.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.target.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.drive.root.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.target.drive.root.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.target.drive.root.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.target.drive.root.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.drive.root.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.drive.root.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.target.drive.root.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.target.fileComment.legacyCommentIdStringThe comment in the discussion thread.
GoogleDrive.DriveActivity.actions.target.fileComment.legacyDiscussionIdStringThe discussion thread to which the comment was added.
GoogleDrive.DriveActivity.actions.target.fileComment.linkToDiscussionStringThe link to the discussion thread containing this comment, for example: "https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.timestampStringThe activity occurred at this specific time.
GoogleDrive.DriveActivity.actions.timeRange.startTimeStringThe start of the time range.
GoogleDrive.DriveActivity.actions.timeRange.endTimeStringThe end of the time range.
GoogleDrive.DriveActivity.targets.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.targets.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.targets.driveItem.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.targets.driveItem.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.targets.driveItem.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.targets.driveItem.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.targets.driveItem.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.targets.driveItem.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.targets.driveItem.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.targets.driveItem.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.driveItem.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.targets.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.targets.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.drive.root.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.targets.drive.root.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.targets.drive.root.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.targets.drive.root.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.targets.drive.root.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.targets.drive.root.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.targets.drive.root.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.targets.drive.root.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.targets.drive.root.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.targets.drive.root.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.drive.root.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.drive.root.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.targets.drive.root.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.targets.fileComment.legacyCommentIdStringThe comment in the discussion thread.
GoogleDrive.DriveActivity.targets.fileComment.legacyDiscussionIdStringThe discussion thread to which the comment was added.
GoogleDrive.DriveActivity.targets.fileComment.linkToDiscussionStringThe link to the discussion thread containing this comment, for example, https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID.
GoogleDrive.DriveActivity.targets.fileComment.parent.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.targets.fileComment.parent.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.targets.fileComment.parent.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.fileComment.parent.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.targets.fileComment.parent.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.timestampStringThe activity occurred at this specific time.
GoogleDrive.DriveActivity.timeRange.startTimeStringThe start of the time range.
GoogleDrive.DriveActivity.timeRange.endTimeStringThe end of the time range.

Command Example#

!google-drive-activity-list user_id=driveactivity@domain.com time_range="1 day"

Context Example#

{
"GoogleDrive": {
"DriveActivity": [
{
"actions": [
{
"detail": {
"delete": {
"type": "TRASH"
}
}
}
],
"actors": [
{
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
}
],
"primaryActionDetail": {
"delete": {
"type": "TRASH"
}
},
"targets": [
{
"driveItem": {
"driveFolder": {
"type": "STANDARD_FOLDER"
},
"folder": {
"type": "STANDARD_FOLDER"
},
"mimeType": "application/vnd.google-apps.folder",
"name": "items/12wYl0wQWfm05lmw9v2HMj8rOePuDlk4S",
"owner": {
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
},
"title": "Folder 2"
}
}
],
"timestamp": "2020-09-30T20:23:58.336Z"
},
{
"actions": [
{
"detail": {
"permissionChange": {
"addedPermissions": [
{
"role": "EDITOR",
"user": {
"knownUser": {
"personName": "people/118105533760233960163"
}
}
}
]
}
}
}
],
"actors": [
{
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
}
],
"primaryActionDetail": {
"permissionChange": {
"addedPermissions": [
{
"role": "EDITOR",
"user": {
"knownUser": {
"personName": "people/118105533760233960163"
}
}
}
]
}
},
"targets": [
{
"driveItem": {
"driveFolder": {
"type": "STANDARD_FOLDER"
},
"folder": {
"type": "STANDARD_FOLDER"
},
"mimeType": "application/vnd.google-apps.folder",
"name": "items/12wYl0wQWfm05lmw9v2HMj8rOePuDlk4S",
"owner": {
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
},
"title": "Folder 2"
}
}
],
"timestamp": "2020-09-30T20:23:51.910Z"
},
{
"actions": [
{
"detail": {
"create": {
"new": true
}
}
},
{
"detail": {
"permissionChange": {
"addedPermissions": [
{
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"role": "VIEWER"
}
]
}
}
},
{
"detail": {
"move": {
"addedParents": [
{
"driveItem": {
"driveFolder": {
"type": "MY_DRIVE_ROOT"
},
"folder": {
"type": "MY_DRIVE_ROOT"
},
"name": "items/0AIEoMKFUOWuTUk9PVA"
}
}
]
}
}
}
],
"actors": [
{
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
}
],
"primaryActionDetail": {
"create": {
"new": true
}
},
"targets": [
{
"driveItem": {
"driveFolder": {
"type": "STANDARD_FOLDER"
},
"folder": {
"type": "STANDARD_FOLDER"
},
"mimeType": "application/vnd.google-apps.folder",
"name": "items/12wYl0wQWfm05lmw9v2HMj8rOePuDlk4S",
"owner": {
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
},
"title": "Folder 2"
}
}
],
"timestamp": "2020-09-30T20:23:36.217Z"
},
{
"actions": [
{
"detail": {
"move": {
"addedParents": [
{
"driveItem": {
"driveFolder": {
"type": "STANDARD_FOLDER"
},
"folder": {
"type": "STANDARD_FOLDER"
},
"name": "items/1qczzfFtukqOKTDDNRxhJrfUxlP99DKBp",
"title": "teste move"
}
}
],
"removedParents": [
{
"driveItem": {
"driveFolder": {
"type": "MY_DRIVE_ROOT"
},
"folder": {
"type": "MY_DRIVE_ROOT"
},
"name": "items/0AIEoMKFUOWuTUk9PVA"
}
}
]
}
}
},
{
"detail": {
"permissionChange": {
"addedPermissions": [
{
"role": "EDITOR",
"user": {
"knownUser": {
"personName": "people/101124359955557659537"
}
}
},
{
"role": "EDITOR",
"user": {
"knownUser": {
"personName": "people/113493660192005193453"
}
}
},
{
"role": "EDITOR",
"user": {
"knownUser": {
"personName": "people/107198004112596790873"
}
}
}
]
}
}
}
],
"actors": [
{
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
}
],
"primaryActionDetail": {
"move": {
"addedParents": [
{
"driveItem": {
"driveFolder": {
"type": "STANDARD_FOLDER"
},
"folder": {
"type": "STANDARD_FOLDER"
},
"name": "items/1qczzfFtukqOKTDDNRxhJrfUxlP99DKBp",
"title": "teste move"
}
}
],
"removedParents": [
{
"driveItem": {
"driveFolder": {
"type": "MY_DRIVE_ROOT"
},
"folder": {
"type": "MY_DRIVE_ROOT"
},
"name": "items/0AIEoMKFUOWuTUk9PVA"
}
}
]
}
},
"targets": [
{
"driveItem": {
"driveFolder": {
"type": "STANDARD_FOLDER"
},
"folder": {
"type": "STANDARD_FOLDER"
},
"mimeType": "application/vnd.google-apps.folder",
"name": "items/1xH9LSUYrbU1Uy-YoBLafQstE-ncuKW_4",
"owner": {
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
},
"title": "test"
}
}
],
"timestamp": "2020-09-30T20:22:47.127Z"
},
{
"actions": [
{
"detail": {
"edit": true
}
}
],
"actors": [
{
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
}
],
"primaryActionDetail": {
"edit": true
},
"targets": [
{
"driveItem": {
"driveFile": true,
"file": true,
"mimeType": "application/vnd.google-apps.document",
"name": "items/18w7gVMVew1JBArDLijAx0tXBrfFoOWzu26YTw6ZpVts",
"owner": {
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
},
"title": "Copy of Digital Citizenship"
}
}
],
"timestamp": "2020-09-30T20:22:36.911Z"
},
{
"actions": [
{
"detail": {
"edit": true
}
}
],
"actors": [
{
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
}
],
"primaryActionDetail": {
"edit": true
},
"targets": [
{
"driveItem": {
"driveFile": true,
"file": true,
"mimeType": "application/vnd.google-apps.document",
"name": "items/18w7gVMVew1JBArDLijAx0tXBrfFoOWzu26YTw6ZpVts",
"owner": {
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
},
"title": "Copy of Digital Citizenship"
}
}
],
"timestamp": "2020-09-30T20:22:34.522Z"
},
{
"actions": [
{
"detail": {
"create": {
"copy": {
"originalObject": {
"driveItem": {
"name": "items/1L4Kie_45D0RVvifsvWxFYwXprXJBZUdXZuAHrzEue2c",
"title": "Digital Citizenship"
}
}
}
}
}
}
],
"actors": [
{
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
}
],
"primaryActionDetail": {
"create": {
"copy": {
"originalObject": {
"driveItem": {
"name": "items/1L4Kie_45D0RVvifsvWxFYwXprXJBZUdXZuAHrzEue2c",
"title": "Digital Citizenship"
}
}
}
}
},
"targets": [
{
"driveItem": {
"driveFile": true,
"file": true,
"mimeType": "application/vnd.google-apps.document",
"name": "items/18w7gVMVew1JBArDLijAx0tXBrfFoOWzu26YTw6ZpVts",
"owner": {
"domain": {
"legacyId": "103399509076533013301",
"name": "domain.com"
},
"user": {
"knownUser": {
"isCurrentUser": true,
"personName": "people/110760345443780932332"
}
}
},
"title": "Copy of Digital Citizenship"
}
}
],
"timestamp": "2020-09-30T20:22:34.175Z"
}
]
}
}

Human Readable Output#

Total Retrieved Drive Activity(s): 7#

Activity TimePrimary ActionObject
2020-09-30T20:23:58.336ZDeleteDelete Type: TRASH
Target: 'Folder 2'
2020-09-30T20:23:51.910ZPermissionChangeTarget: 'Folder 2'
2020-09-30T20:23:36.217ZCreate NewTarget: 'Folder 2'
2020-09-30T20:22:47.127ZMoveTarget: 'test'
2020-09-30T20:22:36.911ZEditTarget: 'Copy of Digital Citizenship'
2020-09-30T20:22:34.522ZEditTarget: 'Copy of Digital Citizenship'
2020-09-30T20:22:34.175ZCreate CopyTarget: 'Copy of Digital Citizenship'