{
  "mtlsRootUrl": "https://driveactivity.mtls.googleapis.com/",
  "version_module": true,
  "batchPath": "batch",
  "resources": {
    "activity": {
      "methods": {
        "query": {
          "id": "driveactivity.activity.query",
          "flatPath": "v2/activity:query",
          "response": {
            "$ref": "QueryDriveActivityResponse"
          },
          "description": "Query past activity in Google Drive.",
          "request": {
            "$ref": "QueryDriveActivityRequest"
          },
          "scopes": [
            "https://www.googleapis.com/auth/drive.activity",
            "https://www.googleapis.com/auth/drive.activity.readonly"
          ],
          "path": "v2/activity:query",
          "parameterOrder": [],
          "httpMethod": "POST",
          "parameters": {}
        }
      }
    }
  },
  "discoveryVersion": "v1",
  "version": "v2",
  "documentationLink": "https://developers.google.com/workspace/drive/activity/",
  "id": "driveactivity:v2",
  "kind": "discovery#restDescription",
  "revision": "20260804",
  "ownerDomain": "google.com",
  "canonicalName": "Drive Activity",
  "schemas": {
    "QueryDriveActivityRequest": {
      "id": "QueryDriveActivityRequest",
      "description": "The request message for querying Drive activity.",
      "properties": {
        "pageToken": {
          "description": "The token identifies which page of results to return. Set this to the next_page_token value returned from a previous query to obtain the following page of results. If not set, the first page of results is returned.",
          "type": "string"
        },
        "filter": {
          "type": "string",
          "description": "The 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 \u003e 1452409200000 AND time \u003c= 1492812924310` - `time \u003e= \"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, separated by a space. To exclude a result from the response, prepend a hyphen (`-`) to the beginning of the filter string. Examples: - `detail.action_detail_case:RENAME` - `detail.action_detail_case:(CREATE RESTORE)` - `-detail.action_detail_case:MOVE` "
        },
        "ancestorName": {
          "type": "string",
          "description": "Return activities for this Drive folder, plus all children and descendants. The format is `items/ITEM_ID`."
        },
        "pageSize": {
          "type": "integer",
          "description": "The minimum number of activities desired in the response; the server attempts to return at least this quantity. The server may also return fewer activities if it has a partial response ready before the request times out. If not set, a default value is used.",
          "format": "int32"
        },
        "itemName": {
          "type": "string",
          "description": "Return activities for this Drive item. The format is `items/ITEM_ID`."
        },
        "consolidationStrategy": {
          "description": "Details on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated.",
          "$ref": "ConsolidationStrategy"
        }
      },
      "type": "object"
    },
    "SingleUser": {
      "description": "Wrapper for User Field value.",
      "properties": {
        "value": {
          "type": "string",
          "description": "User value as email."
        }
      },
      "type": "object",
      "id": "SingleUser"
    },
    "DriveItem": {
      "id": "DriveItem",
      "description": "A Drive item, such as a file or folder.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The target Drive item. The format is `items/ITEM_ID`."
        },
        "driveFile": {
          "description": "The Drive item is a file.",
          "$ref": "DriveFile"
        },
        "mimeType": {
          "description": "The MIME type of the Drive item. See https://developers.google.com/workspace/drive/v3/web/mime-types.",
          "type": "string"
        },
        "driveFolder": {
          "description": "The Drive item is a folder. Includes information about the type of folder.",
          "$ref": "DriveFolder"
        },
        "owner": {
          "description": "Information about the owner of this Drive item.",
          "$ref": "Owner"
        },
        "file": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `driveFile` field instead.",
          "$ref": "File"
        },
        "folder": {
          "$ref": "Folder",
          "deprecated": true,
          "description": "This field is deprecated; please use the `driveFolder` field instead."
        },
        "title": {
          "type": "string",
          "description": "The title of the Drive item."
        }
      },
      "type": "object"
    },
    "Text": {
      "id": "Text",
      "type": "object",
      "description": "Wrapper for Text Field value.",
      "properties": {
        "value": {
          "description": "Value of Text Field.",
          "type": "string"
        }
      }
    },
    "File": {
      "properties": {},
      "deprecated": true,
      "type": "object",
      "id": "File",
      "description": "This item is deprecated; please see `DriveFile` instead."
    },
    "Delete": {
      "id": "Delete",
      "description": "An object was deleted.",
      "properties": {
        "type": {
          "enumDescriptions": [
            "Deletion type is not available.",
            "An object was put into the trash.",
            "An object was deleted permanently."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "TRASH",
            "PERMANENT_DELETE"
          ],
          "description": "The type of delete action taken."
        }
      },
      "type": "object"
    },
    "DataLeakPreventionChange": {
      "type": "object",
      "description": "A change in the object's data leak prevention status.",
      "properties": {
        "type": {
          "description": "The type of Data Leak Prevention (DLP) change.",
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "FLAGGED",
            "CLEARED"
          ],
          "enumDescriptions": [
            "An update to the DLP state that is neither FLAGGED or CLEARED.",
            "Document has been flagged as containing sensitive content.",
            "Document is no longer flagged as containing sensitive content."
          ]
        }
      },
      "id": "DataLeakPreventionChange"
    },
    "Copy": {
      "type": "object",
      "description": "An object was created by copying an existing object.",
      "properties": {
        "originalObject": {
          "$ref": "TargetReference",
          "description": "The original object."
        }
      },
      "id": "Copy"
    },
    "Edit": {
      "type": "object",
      "description": "An empty message indicating an object was edited.",
      "properties": {},
      "id": "Edit"
    },
    "Impersonation": {
      "type": "object",
      "description": "Information about an impersonation, where an admin acts on behalf of an end user. Information about the acting admin is not currently available.",
      "properties": {
        "impersonatedUser": {
          "description": "The impersonated user.",
          "$ref": "User"
        }
      },
      "id": "Impersonation"
    },
    "Target": {
      "type": "object",
      "description": "Information about the target of activity. For more information on how activity history is shared with users, see [Activity history visibility](https://developers.google.com/workspace/drive/activity/v2#activityhistory).",
      "properties": {
        "teamDrive": {
          "description": "This field is deprecated; please use the `drive` field instead.",
          "deprecated": true,
          "$ref": "TeamDrive"
        },
        "driveItem": {
          "description": "The target is a Drive item.",
          "$ref": "DriveItem"
        },
        "drive": {
          "$ref": "Drive",
          "description": "The target is a shared drive."
        },
        "fileComment": {
          "description": "The target is a comment on a Drive file.",
          "$ref": "FileComment"
        }
      },
      "id": "Target"
    },
    "Domain": {
      "id": "Domain",
      "description": "Information about a domain.",
      "properties": {
        "legacyId": {
          "type": "string",
          "description": "An opaque string used to identify this domain."
        },
        "name": {
          "description": "The name of the domain, e.g. `google.com`.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SettingsChange": {
      "id": "SettingsChange",
      "type": "object",
      "description": "Information about settings changes.",
      "properties": {
        "restrictionChanges": {
          "description": "The set of changes made to restrictions.",
          "type": "array",
          "items": {
            "$ref": "RestrictionChange"
          }
        }
      }
    },
    "NoConsolidation": {
      "id": "NoConsolidation",
      "description": "A strategy that does no consolidation of individual activities.",
      "properties": {},
      "type": "object"
    },
    "New": {
      "id": "New",
      "type": "object",
      "description": "An object was created from scratch.",
      "properties": {}
    },
    "DriveFile": {
      "id": "DriveFile",
      "type": "object",
      "description": "A Drive item which is a file.",
      "properties": {}
    },
    "Anyone": {
      "id": "Anyone",
      "description": "Represents any user (including a logged out user).",
      "properties": {},
      "type": "object"
    },
    "DeletedUser": {
      "id": "DeletedUser",
      "description": "A user whose account has since been deleted.",
      "properties": {},
      "type": "object"
    },
    "Post": {
      "description": "A regular posted comment.",
      "properties": {
        "subtype": {
          "enumDescriptions": [
            "Subtype not available.",
            "A post was added.",
            "A post was deleted.",
            "A reply was added.",
            "A reply was deleted.",
            "A posted comment was resolved.",
            "A posted comment was reopened."
          ],
          "type": "string",
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "RESOLVED",
            "REOPENED"
          ],
          "description": "The sub-type of this event."
        }
      },
      "type": "object",
      "id": "Post"
    },
    "Integer": {
      "id": "Integer",
      "type": "object",
      "description": "Wrapper for Integer Field value.",
      "properties": {
        "value": {
          "type": "string",
          "description": "Integer value.",
          "format": "int64"
        }
      }
    },
    "Comment": {
      "id": "Comment",
      "type": "object",
      "description": "A change about comments on an object.",
      "properties": {
        "post": {
          "$ref": "Post",
          "description": "A change on a regular posted comment."
        },
        "assignment": {
          "description": "A change on an assignment.",
          "$ref": "Assignment"
        },
        "mentionedUsers": {
          "description": "Users who are mentioned in this comment.",
          "type": "array",
          "items": {
            "$ref": "User"
          }
        },
        "suggestion": {
          "description": "A change on a suggestion.",
          "$ref": "Suggestion"
        }
      }
    },
    "UnknownUser": {
      "id": "UnknownUser",
      "type": "object",
      "description": "A user about whom nothing is currently known.",
      "properties": {}
    },
    "DriveActivity": {
      "id": "DriveActivity",
      "description": "A single Drive activity comprising one or more Actions by one or more Actors on one or more Targets. Some Action groupings occur spontaneously, such as moving an item into a shared folder triggering a permission change. Other groupings of related Actions, such as multiple Actors editing one item or moving multiple files into a new folder, are controlled by the selection of a ConsolidationStrategy in the QueryDriveActivityRequest.",
      "properties": {
        "timestamp": {
          "format": "google-datetime",
          "description": "The activity occurred at this specific time.",
          "type": "string"
        },
        "timeRange": {
          "description": "The activity occurred over this time range.",
          "$ref": "TimeRange"
        },
        "primaryActionDetail": {
          "description": "Key information about the primary action for this activity. This is either representative, or the most important, of all actions in the activity, according to the ConsolidationStrategy in the request.",
          "$ref": "ActionDetail"
        },
        "actors": {
          "type": "array",
          "items": {
            "$ref": "Actor"
          },
          "description": "All actor(s) responsible for the activity."
        },
        "targets": {
          "type": "array",
          "items": {
            "$ref": "Target"
          },
          "description": "All Google Drive objects this activity is about (e.g. file, folder, drive). This represents the state of the target immediately after the actions occurred."
        },
        "actions": {
          "description": "Details on all actions in this activity.",
          "type": "array",
          "items": {
            "$ref": "Action"
          }
        }
      },
      "type": "object"
    },
    "Restore": {
      "description": "A deleted object was restored.",
      "properties": {
        "type": {
          "enumDescriptions": [
            "The type is not available.",
            "An object was restored from the trash."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "UNTRASH"
          ],
          "description": "The type of restore action taken."
        }
      },
      "type": "object",
      "id": "Restore"
    },
    "Create": {
      "id": "Create",
      "type": "object",
      "description": "An object was created.",
      "properties": {
        "new": {
          "$ref": "New",
          "description": "If present, indicates the object was newly created (e.g. as a blank document), not derived from a Drive object or external object."
        },
        "upload": {
          "$ref": "Upload",
          "description": "If present, indicates the object originated externally and was uploaded to Drive."
        },
        "copy": {
          "description": "If present, indicates the object was created by copying an existing Drive object.",
          "$ref": "Copy"
        }
      }
    },
    "Suggestion": {
      "type": "object",
      "description": "A suggestion.",
      "properties": {
        "subtype": {
          "enumDescriptions": [
            "Subtype not available.",
            "A suggestion was added.",
            "A suggestion was deleted.",
            "A suggestion reply was added.",
            "A suggestion reply was deleted.",
            "A suggestion was accepted.",
            "A suggestion was rejected.",
            "An accepted suggestion was deleted.",
            "A rejected suggestion was deleted."
          ],
          "description": "The sub-type of this event.",
          "type": "string",
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "ACCEPTED",
            "REJECTED",
            "ACCEPT_DELETED",
            "REJECT_DELETED"
          ]
        }
      },
      "id": "Suggestion"
    },
    "RestrictionChange": {
      "type": "object",
      "description": "Information about restriction policy changes to a feature.",
      "properties": {
        "newRestriction": {
          "description": "The restriction in place after the change.",
          "type": "string",
          "enum": [
            "RESTRICTION_UNSPECIFIED",
            "UNRESTRICTED",
            "FULLY_RESTRICTED"
          ],
          "enumDescriptions": [
            "The type of restriction is not available.",
            "The feature is available without restriction.",
            "The use of this feature is fully restricted."
          ]
        },
        "feature": {
          "type": "string",
          "enum": [
            "FEATURE_UNSPECIFIED",
            "SHARING_OUTSIDE_DOMAIN",
            "DIRECT_SHARING",
            "ITEM_DUPLICATION",
            "DRIVE_FILE_STREAM",
            "FILE_ORGANIZER_CAN_SHARE_FOLDERS",
            "READERS_CAN_DOWNLOAD",
            "WRITERS_CAN_DOWNLOAD"
          ],
          "enumDescriptions": [
            "The feature which changed restriction settings was not available.",
            "When restricted, this prevents items from being shared outside the domain.",
            "When restricted, this prevents direct sharing of individual items.",
            "Deprecated: Use READERS_CAN_DOWNLOAD instead.",
            "When restricted, this prevents use of Drive File Stream.",
            "When restricted, this limits sharing of folders to managers only.",
            "When restricted, this prevents actions like copy, download, and print for readers. Replaces ITEM_DUPLICATION.",
            "When restricted, this prevents actions like copy, download, and print for writers."
          ],
          "enumDeprecated": [
            false,
            false,
            false,
            true,
            false,
            false,
            false,
            false
          ],
          "description": "The feature which had a change in restriction policy."
        }
      },
      "id": "RestrictionChange"
    },
    "TargetReference": {
      "type": "object",
      "description": "A lightweight reference to the target of activity.",
      "properties": {
        "teamDrive": {
          "$ref": "TeamDriveReference",
          "description": "This field is deprecated; please use the `drive` field instead.",
          "deprecated": true
        },
        "driveItem": {
          "description": "The target is a Drive item.",
          "$ref": "DriveItemReference"
        },
        "drive": {
          "description": "The target is a shared drive.",
          "$ref": "DriveReference"
        }
      },
      "id": "TargetReference"
    },
    "Permission": {
      "id": "Permission",
      "description": "The permission setting of an object.",
      "properties": {
        "role": {
          "enumDescriptions": [
            "The role is not available.",
            "A role granting full access.",
            "A role granting the ability to manage people and settings.",
            "A role granting the ability to contribute and manage content.",
            "A role granting the ability to contribute content. This role is sometimes also known as \"writer\".",
            "A role granting the ability to view and comment on content.",
            "A role granting the ability to view content. This role is sometimes also known as \"reader\".",
            "A role granting the ability to view content only after it has been published to the web. This role is sometimes also known as \"published reader\". See https://support.google.com/sites/answer/6372880 for more information."
          ],
          "type": "string",
          "enum": [
            "ROLE_UNSPECIFIED",
            "OWNER",
            "ORGANIZER",
            "FILE_ORGANIZER",
            "EDITOR",
            "COMMENTER",
            "VIEWER",
            "PUBLISHED_VIEWER"
          ],
          "description": "Indicates the [Google Drive permissions role](https://developers.google.com/workspace/drive/web/manage-sharing#roles). The role determines a user's ability to read, write, and comment on items."
        },
        "group": {
          "description": "The group to whom this permission applies.",
          "$ref": "Group"
        },
        "domain": {
          "description": "The domain to whom this permission applies.",
          "$ref": "Domain"
        },
        "anyone": {
          "$ref": "Anyone",
          "description": "If set, this permission applies to anyone, even logged out users."
        },
        "allowDiscovery": {
          "description": "If true, the item can be discovered (e.g. in the user's \"Shared with me\" collection) without needing a link to the item.",
          "type": "boolean"
        },
        "user": {
          "$ref": "User",
          "description": "The user to whom this permission applies."
        }
      },
      "type": "object"
    },
    "PermissionChange": {
      "description": "A change of the permission setting on an item.",
      "properties": {
        "addedPermissions": {
          "type": "array",
          "items": {
            "$ref": "Permission"
          },
          "description": "The set of permissions added by this change."
        },
        "removedPermissions": {
          "description": "The set of permissions removed by this change.",
          "type": "array",
          "items": {
            "$ref": "Permission"
          }
        }
      },
      "type": "object",
      "id": "PermissionChange"
    },
    "Folder": {
      "description": "This item is deprecated; please see `DriveFolder` instead.",
      "id": "Folder",
      "deprecated": true,
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "MY_DRIVE_ROOT",
            "TEAM_DRIVE_ROOT",
            "STANDARD_FOLDER"
          ],
          "description": "This field is deprecated; please see `DriveFolder.type` instead.",
          "enumDescriptions": [
            "This item is deprecated; please see `DriveFolder.Type` instead.",
            "This item is deprecated; please see `DriveFolder.Type` instead.",
            "This item is deprecated; please see `DriveFolder.Type` instead.",
            "This item is deprecated; please see `DriveFolder.Type` instead."
          ]
        }
      }
    },
    "Drive": {
      "id": "Drive",
      "type": "object",
      "description": "Information about a shared drive.",
      "properties": {
        "title": {
          "description": "The title of the shared drive.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name."
        },
        "root": {
          "$ref": "DriveItem",
          "description": "The root of this shared drive."
        }
      }
    },
    "Action": {
      "type": "object",
      "description": "Information about the action.",
      "properties": {
        "target": {
          "description": "The target this action affects (or empty if affecting all targets). This represents the state of the target immediately after this action occurred.",
          "$ref": "Target"
        },
        "detail": {
          "description": "The type and detailed information about the action.",
          "$ref": "ActionDetail"
        },
        "actor": {
          "description": "The actor responsible for this action (or empty if all actors are responsible).",
          "$ref": "Actor"
        },
        "timestamp": {
          "type": "string",
          "description": "The action occurred at this specific time.",
          "format": "google-datetime"
        },
        "timeRange": {
          "description": "The action occurred over this time range.",
          "$ref": "TimeRange"
        }
      },
      "id": "Action"
    },
    "DriveReference": {
      "id": "DriveReference",
      "type": "object",
      "description": "A lightweight reference to a shared drive.",
      "properties": {
        "name": {
          "description": "The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name.",
          "type": "string"
        },
        "title": {
          "description": "The title of the shared drive.",
          "type": "string"
        }
      }
    },
    "FieldValueChange": {
      "id": "FieldValueChange",
      "description": "Change to a Field value.",
      "properties": {
        "oldValue": {
          "description": "The value that was previously set on the field. If not present, the field was newly set. At least one of {old_value|new_value} is always set.",
          "$ref": "FieldValue"
        },
        "displayName": {
          "type": "string",
          "description": "The human-readable display name for this field."
        },
        "newValue": {
          "$ref": "FieldValue",
          "description": "The value that is now set on the field. If not present, the field was cleared. At least one of {old_value|new_value} is always set."
        },
        "fieldId": {
          "description": "The ID of this field. Field IDs are unique within a Label.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ApplicationReference": {
      "id": "ApplicationReference",
      "type": "object",
      "description": "Activity in applications other than Drive.",
      "properties": {
        "type": {
          "description": "The reference type corresponding to this event.",
          "type": "string",
          "enum": [
            "UNSPECIFIED_REFERENCE_TYPE",
            "LINK",
            "DISCUSS"
          ],
          "enumDescriptions": [
            "The type is not available.",
            "The links of one or more Drive items were posted.",
            "Comments were made regarding a Drive item."
          ]
        }
      }
    },
    "AnonymousUser": {
      "type": "object",
      "description": "Empty message representing an anonymous user or indicating the authenticated user should be anonymized.",
      "properties": {},
      "id": "AnonymousUser"
    },
    "Move": {
      "id": "Move",
      "type": "object",
      "description": "An object was moved.",
      "properties": {
        "addedParents": {
          "description": "The added parent object(s).",
          "type": "array",
          "items": {
            "$ref": "TargetReference"
          }
        },
        "removedParents": {
          "description": "The removed parent object(s).",
          "type": "array",
          "items": {
            "$ref": "TargetReference"
          }
        }
      }
    },
    "TimeRange": {
      "id": "TimeRange",
      "description": "Information about time ranges.",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "The start of the time range.",
          "format": "google-datetime"
        },
        "endTime": {
          "format": "google-datetime",
          "description": "The end of the time range.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "User": {
      "type": "object",
      "description": "Information about an end user.",
      "properties": {
        "deletedUser": {
          "description": "A user whose account has since been deleted.",
          "$ref": "DeletedUser"
        },
        "unknownUser": {
          "description": "A user about whom nothing is currently known.",
          "$ref": "UnknownUser"
        },
        "knownUser": {
          "$ref": "KnownUser",
          "description": "A known user."
        }
      },
      "id": "User"
    },
    "Upload": {
      "type": "object",
      "description": "An object was uploaded into Drive.",
      "properties": {},
      "id": "Upload"
    },
    "Rename": {
      "id": "Rename",
      "description": "An object was renamed.",
      "properties": {
        "oldTitle": {
          "type": "string",
          "description": "The previous title of the drive object."
        },
        "newTitle": {
          "type": "string",
          "description": "The new title of the drive object."
        }
      },
      "type": "object"
    },
    "Group": {
      "description": "Information about a group.",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the group."
        },
        "email": {
          "description": "The email address of the group.",
          "type": "string"
        }
      },
      "type": "object",
      "id": "Group"
    },
    "TeamDrive": {
      "properties": {
        "title": {
          "description": "This field is deprecated; please see `Drive.title` instead.",
          "type": "string"
        },
        "root": {
          "description": "This field is deprecated; please see `Drive.root` instead.",
          "$ref": "DriveItem"
        },
        "name": {
          "description": "This field is deprecated; please see `Drive.name` instead.",
          "type": "string"
        }
      },
      "deprecated": true,
      "type": "object",
      "id": "TeamDrive",
      "description": "This item is deprecated; please see `Drive` instead."
    },
    "ActionDetail": {
      "id": "ActionDetail",
      "type": "object",
      "description": "Data describing the type and additional information of an action.",
      "properties": {
        "permissionChange": {
          "description": "The permission on an object was changed.",
          "$ref": "PermissionChange"
        },
        "reference": {
          "$ref": "ApplicationReference",
          "description": "An object was referenced in an application outside of Drive/Docs."
        },
        "delete": {
          "$ref": "Delete",
          "description": "An object was deleted."
        },
        "rename": {
          "$ref": "Rename",
          "description": "An object was renamed."
        },
        "settingsChange": {
          "description": "Settings were changed.",
          "$ref": "SettingsChange"
        },
        "restore": {
          "$ref": "Restore",
          "description": "A deleted object was restored."
        },
        "comment": {
          "description": "A change about comments was made.",
          "$ref": "Comment"
        },
        "edit": {
          "description": "An object was edited.",
          "$ref": "Edit"
        },
        "appliedLabelChange": {
          "description": "Label was changed.",
          "$ref": "AppliedLabelChange"
        },
        "create": {
          "description": "An object was created.",
          "$ref": "Create"
        },
        "move": {
          "description": "An object was moved.",
          "$ref": "Move"
        },
        "dlpChange": {
          "$ref": "DataLeakPreventionChange",
          "description": "A change happened in data leak prevention status."
        }
      }
    },
    "FieldValue": {
      "type": "object",
      "description": "Contains a value of a Field.",
      "properties": {
        "integer": {
          "$ref": "Integer",
          "description": "Integer Field value."
        },
        "text": {
          "description": "Text Field value.",
          "$ref": "Text"
        },
        "date": {
          "$ref": "Date",
          "description": "Date Field value."
        },
        "selectionList": {
          "description": "Selection List Field value.",
          "$ref": "SelectionList"
        },
        "userList": {
          "description": "User List Field value.",
          "$ref": "UserList"
        },
        "textList": {
          "$ref": "TextList",
          "description": "Text List Field value."
        },
        "selection": {
          "$ref": "Selection",
          "description": "Selection Field value."
        },
        "user": {
          "$ref": "SingleUser",
          "description": "User Field value."
        }
      },
      "id": "FieldValue"
    },
    "SystemEvent": {
      "description": "Event triggered by system operations instead of end users.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "USER_DELETION",
            "TRASH_AUTO_PURGE"
          ],
          "description": "The type of the system event that may triggered activity.",
          "enumDescriptions": [
            "The event type is unspecified.",
            "The event is a consequence of a user account being deleted.",
            "The event is due to the system automatically purging trash."
          ]
        }
      },
      "type": "object",
      "id": "SystemEvent"
    },
    "Owner": {
      "id": "Owner",
      "type": "object",
      "description": "Information about the owner of a Drive item.",
      "properties": {
        "teamDrive": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `drive` field instead.",
          "$ref": "TeamDriveReference"
        },
        "domain": {
          "description": "The domain of the Drive item owner.",
          "$ref": "Domain"
        },
        "user": {
          "$ref": "User",
          "description": "The user that owns the Drive item."
        },
        "drive": {
          "$ref": "DriveReference",
          "description": "The drive that owns the item."
        }
      }
    },
    "Selection": {
      "id": "Selection",
      "description": "Wrapper for Selection Field value as combined value/display_name pair for selected choice.",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Selection value as human-readable display string."
        },
        "value": {
          "description": "Selection value as Field Choice ID.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Administrator": {
      "id": "Administrator",
      "type": "object",
      "description": "Empty message representing an administrator.",
      "properties": {}
    },
    "TeamDriveReference": {
      "deprecated": true,
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "This field is deprecated; please see `DriveReference.name` instead."
        },
        "title": {
          "description": "This field is deprecated; please see `DriveReference.title` instead.",
          "type": "string"
        }
      },
      "id": "TeamDriveReference",
      "description": "This item is deprecated; please see `DriveReference` instead."
    },
    "AppliedLabelChange": {
      "description": "Label changes that were made on the Target.",
      "properties": {
        "changes": {
          "type": "array",
          "items": {
            "$ref": "AppliedLabelChangeDetail"
          },
          "description": "Changes that were made to the Label on the Target."
        }
      },
      "type": "object",
      "id": "AppliedLabelChange"
    },
    "DriveItemReference": {
      "id": "DriveItemReference",
      "type": "object",
      "description": "A lightweight reference to a Drive item, such as a file or folder.",
      "properties": {
        "file": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `driveFile` field instead.",
          "$ref": "File"
        },
        "folder": {
          "description": "This field is deprecated; please use the `driveFolder` field instead.",
          "deprecated": true,
          "$ref": "Folder"
        },
        "title": {
          "description": "The title of the Drive item.",
          "type": "string"
        },
        "name": {
          "description": "The target Drive item. The format is `items/ITEM_ID`.",
          "type": "string"
        },
        "driveFile": {
          "description": "The Drive item is a file.",
          "$ref": "DriveFile"
        },
        "driveFolder": {
          "description": "The Drive item is a folder. Includes information about the type of folder.",
          "$ref": "DriveFolder"
        }
      }
    },
    "FileComment": {
      "type": "object",
      "description": "A comment on a file.",
      "properties": {
        "parent": {
          "description": "The Drive item containing this comment.",
          "$ref": "DriveItem"
        },
        "legacyCommentId": {
          "type": "string",
          "description": "The comment in the discussion thread. This identifier is an opaque string compatible with the Drive API; see https://developers.google.com/workspace/drive/v3/reference/comments/get"
        },
        "legacyDiscussionId": {
          "type": "string",
          "description": "The discussion thread to which the comment was added. This identifier is an opaque string compatible with the Drive API and references the first comment in a discussion; see https://developers.google.com/workspace/drive/v3/reference/comments/get"
        },
        "linkToDiscussion": {
          "type": "string",
          "description": "The link to the discussion thread containing this comment, for example, `https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`."
        }
      },
      "id": "FileComment"
    },
    "QueryDriveActivityResponse": {
      "id": "QueryDriveActivityResponse",
      "type": "object",
      "description": "Response message for querying Drive activity.",
      "properties": {
        "activities": {
          "description": "List of activity requested.",
          "type": "array",
          "items": {
            "$ref": "DriveActivity"
          }
        },
        "nextPageToken": {
          "type": "string",
          "description": "Token to retrieve the next page of results, or empty if there are no more results in the list."
        }
      }
    },
    "Assignment": {
      "type": "object",
      "description": "A comment with an assignment.",
      "properties": {
        "subtype": {
          "enumDescriptions": [
            "Subtype not available.",
            "An assignment was added.",
            "An assignment was deleted.",
            "An assignment reply was added.",
            "An assignment reply was deleted.",
            "An assignment was resolved.",
            "A resolved assignment was reopened.",
            "An assignment was reassigned."
          ],
          "description": "The sub-type of this event.",
          "type": "string",
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "RESOLVED",
            "REOPENED",
            "REASSIGNED"
          ]
        },
        "assignedUser": {
          "$ref": "User",
          "description": "The user to whom the comment was assigned."
        }
      },
      "id": "Assignment"
    },
    "Date": {
      "id": "Date",
      "description": "Wrapper for Date Field value.",
      "properties": {
        "value": {
          "format": "google-datetime",
          "type": "string",
          "description": "Date value."
        }
      },
      "type": "object"
    },
    "ConsolidationStrategy": {
      "id": "ConsolidationStrategy",
      "description": "How the individual activities are consolidated. If a set of activities is related they can be consolidated into one combined activity, such as one actor performing the same action on multiple targets, or multiple actors performing the same action on a single target. The strategy defines the rules for which activities are related.",
      "properties": {
        "legacy": {
          "$ref": "Legacy",
          "description": "The individual activities are consolidated using the legacy strategy."
        },
        "none": {
          "$ref": "NoConsolidation",
          "description": "The individual activities are not consolidated."
        }
      },
      "type": "object"
    },
    "Legacy": {
      "description": "A strategy that consolidates activities using the grouping rules from the legacy V1 Activity API. Similar actions occurring within a window of time can be grouped across multiple targets (such as moving a set of files at once) or multiple actors (such as several users editing the same item). Grouping rules for this strategy are specific to each type of action.",
      "properties": {},
      "type": "object",
      "id": "Legacy"
    },
    "DriveFolder": {
      "description": "A Drive item which is a folder.",
      "properties": {
        "type": {
          "enumDescriptions": [
            "The folder type is unknown.",
            "The folder is the root of a user's MyDrive.",
            "The folder is the root of a shared drive.",
            "The folder is a standard, non-root, folder."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "MY_DRIVE_ROOT",
            "SHARED_DRIVE_ROOT",
            "STANDARD_FOLDER"
          ],
          "description": "The type of Drive folder."
        }
      },
      "type": "object",
      "id": "DriveFolder"
    },
    "Actor": {
      "id": "Actor",
      "description": "The actor of a Drive activity.",
      "properties": {
        "impersonation": {
          "description": "An account acting on behalf of another.",
          "$ref": "Impersonation"
        },
        "anonymous": {
          "$ref": "AnonymousUser",
          "description": "An anonymous user."
        },
        "user": {
          "description": "An end user.",
          "$ref": "User"
        },
        "system": {
          "description": "A non-user actor (i.e. system triggered).",
          "$ref": "SystemEvent"
        },
        "administrator": {
          "$ref": "Administrator",
          "description": "An administrator."
        }
      },
      "type": "object"
    },
    "KnownUser": {
      "id": "KnownUser",
      "description": "A known user.",
      "properties": {
        "personName": {
          "description": "The identifier for this user that can be used with the People API to get more information. The format is `people/ACCOUNT_ID`. See https://developers.google.com/people/.",
          "type": "string"
        },
        "isCurrentUser": {
          "type": "boolean",
          "description": "True if this is the user making the request."
        }
      },
      "type": "object"
    },
    "SelectionList": {
      "id": "SelectionList",
      "type": "object",
      "description": "Wrapper for SelectionList Field value.",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "Selection"
          },
          "description": "Selection values."
        }
      }
    },
    "TextList": {
      "description": "Wrapper for Text List Field value.",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "Text"
          },
          "description": "Text values."
        }
      },
      "type": "object",
      "id": "TextList"
    },
    "AppliedLabelChangeDetail": {
      "id": "AppliedLabelChangeDetail",
      "type": "object",
      "description": "A change made to a Label on the Target.",
      "properties": {
        "title": {
          "type": "string",
          "description": "The human-readable title of the label that changed."
        },
        "types": {
          "description": "The types of changes made to the Label on the Target.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "TYPE_UNSPECIFIED",
              "LABEL_ADDED",
              "LABEL_REMOVED",
              "LABEL_FIELD_VALUE_CHANGED",
              "LABEL_APPLIED_BY_ITEM_CREATE"
            ],
            "enumDescriptions": [
              "The type of change to this Label is not available.",
              "The identified Label was added to the Target.",
              "The identified Label was removed from the Target.",
              "Field values were changed on the Target.",
              "The Label was applied as a side-effect of Drive item creation."
            ]
          }
        },
        "fieldChanges": {
          "type": "array",
          "items": {
            "$ref": "FieldValueChange"
          },
          "description": "Field Changes. Only present if `types` contains `LABEL_FIELD_VALUE_CHANGED`."
        },
        "label": {
          "type": "string",
          "description": "The Label name representing the Label that changed. This name always contains the revision of the Label that was used when this Action occurred. The format is `labels/id@revision`."
        }
      }
    },
    "UserList": {
      "description": "Wrapper for UserList Field value.",
      "properties": {
        "values": {
          "description": "User values.",
          "type": "array",
          "items": {
            "$ref": "SingleUser"
          }
        }
      },
      "type": "object",
      "id": "UserList"
    }
  },
  "title": "Drive Activity API",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/drive.activity": {
          "description": "View and add to the activity record of files in your Google Drive"
        },
        "https://www.googleapis.com/auth/drive.activity.readonly": {
          "description": "View the activity record of files in your Google Drive"
        }
      }
    }
  },
  "name": "driveactivity",
  "baseUrl": "https://driveactivity.googleapis.com/",
  "fullyEncodeReservedExpansion": true,
  "description": "Provides a historical view of activity in Google Drive.",
  "ownerName": "Google",
  "basePath": "",
  "servicePath": "",
  "parameters": {
    "upload_protocol": {
      "location": "query",
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "callback": {
      "location": "query",
      "type": "string",
      "description": "JSONP"
    },
    "prettyPrint": {
      "location": "query",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "default": "true"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query",
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "description": "V1 error format."
    },
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "quotaUser": {
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "alt": {
      "description": "Data format for response.",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "default": "json",
      "location": "query",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ]
    }
  },
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "protocol": "rest",
  "rootUrl": "https://driveactivity.googleapis.com/"
}
