Drive Activity API
Provides a historical view of activity
COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
"openapi": "3.0.0",
"servers": [
{
"url": "https://www.googleapis.com/appsactivity/v1"
}
],
"info": {
"contact": {
"name": "Google",
"url": "https://google.com",
"x-twitter": "youtube"
},
"description": "Provides a historical view of activity.",
"license": {
"name": "Creative Commons Attribution 3.0",
"url": "http://creativecommons.org/licenses/by/3.0/"
},
"termsOfService": "https://developers.google.com/terms/",
"title": "Drive Activity API",
"version": "v1",
"x-apiClientRegistration": {
"url": "https://console.developers.google.com"
},
"x-apisguru-categories": [
"analytics",
"media"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_www.google.com_images_branding_googlelogo_2x_googlelogo_color_272x92dp.png"
},
"x-origin": [
{
"converter": {
"url": "https://github.com/lucybot/api-spec-converter",
"version": "2.7.31"
},
"format": "google",
"url": "https://www.googleapis.com/discovery/v1/apis/appsactivity/v1/rest",
"version": "v1"
}
],
"x-providerName": "googleapis.com",
"x-serviceName": "appsactivity"
},
"externalDocs": {
"url": "https://developers.google.com/google-apps/activity/"
},
"tags": [
{
"name": "activities"
}
],
"paths": {
"/activities": {
"get": {
"description": "Returns a list of activities visible to the current logged in user. Visible activities are determined by the visibility settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter.",
"operationId": "appsactivity.activities.list",
"parameters": [
{
"description": "Identifies the Drive folder containing the items for which to return activities.",
"in": "query",
"name": "drive.ancestorId",
"schema": {
"type": "string"
}
},
{
"description": "Identifies the Drive item to return activities for.",
"in": "query",
"name": "drive.fileId",
"schema": {
"type": "string"
}
},
{
"description": "Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object.",
"in": "query",
"name": "groupingStrategy",
"schema": {
"enum": [
"driveUi",
"none"
],
"type": "string"
}
},
{
"description": "The maximum number of events to return on a page. The response includes a continuation token if there are more events.",
"in": "query",
"name": "pageSize",
"schema": {
"type": "integer"
}
},
{
"description": "A token to retrieve a specific page of results.",
"in": "query",
"name": "pageToken",
"schema": {
"type": "string"
}
},
{
"description": "The Google service from which to return activities. Possible values of source are: \n- drive.google.com",
"in": "query",
"name": "source",
"schema": {
"type": "string"
}
},
{
"description": "The ID used for ACL checks (does not filter the resulting event list by the assigned value). Use the special value me to indicate the currently authenticated user.",
"in": "query",
"name": "userId",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListActivitiesResponse"
}
}
},
"description": "Successful response"
}
},
"security": [
{
"Oauth2": [
"https://www.googleapis.com/auth/activity"
],
"Oauth2c": [
"https://www.googleapis.com/auth/activity"
]
}
],
"tags": [
"activities"
]
},
"parameters": [
{
"$ref": "#/components/parameters/alt"
},
{
"$ref": "#/components/parameters/fields"
},
{
"$ref": "#/components/parameters/key"
},
{
"$ref": "#/components/parameters/oauth_token"
},
{
"$ref": "#/components/parameters/prettyPrint"
},
{
"$ref": "#/components/parameters/quotaUser"
},
{
"$ref": "#/components/parameters/userIp"
}
]
}
},
"components": {
"parameters": {
"alt": {
"description": "Data format for the response.",
"in": "query",
"name": "alt",
"schema": {
"enum": [
"json"
],
"type": "string"
}
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
},
"key": {
"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.",
"in": "query",
"name": "key",
"schema": {
"type": "string"
}
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"in": "query",
"name": "oauth_token",
"schema": {
"type": "string"
}
},
"prettyPrint": {
"description": "Returns response with indentations and line breaks.",
"in": "query",
"name": "prettyPrint",
"schema": {
"type": "boolean"
}
},
"quotaUser": {
"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
"in": "query",
"name": "quotaUser",
"schema": {
"type": "string"
}
},
"userIp": {
"description": "Deprecated. Please use quotaUser instead.",
"in": "query",
"name": "userIp",
"schema": {
"type": "string"
}
}
},
"schemas": {
"Activity": {
"description": "An Activity resource is a combined view of multiple events. An activity has a list of individual events and a combined view of the common fields among all events.",
"properties": {
"combinedEvent": {
"$ref": "#/components/schemas/Event",
"description": "The fields common to all of the singleEvents that make up the Activity."
},
"singleEvents": {
"description": "A list of all the Events that make up the Activity.",
"items": {
"$ref": "#/components/schemas/Event"
},
"type": "array"
}
},
"type": "object"
},
"Event": {
"description": "Represents the changes associated with an action taken by a user.",
"properties": {
"additionalEventTypes": {
"description": "Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, renaming it, and sharing it may be part of a single file-creation event.",
"items": {
"enum": [
"comment",
"create",
"edit",
"emptyTrash",
"move",
"permissionChange",
"rename",
"trash",
"unknown",
"untrash",
"upload"
],
"type": "string"
},
"type": "array"
},
"eventTimeMillis": {
"description": "The time at which the event occurred formatted as Unix time in milliseconds.",
"format": "uint64",
"type": "string"
},
"fromUserDeletion": {
"description": "Whether this event is caused by a user being deleted.",
"type": "boolean"
},
"move": {
"$ref": "#/components/schemas/Move",
"description": "Extra information for move type events, such as changes in an object's parents."
},
"permissionChanges": {
"description": "Extra information for permissionChange type events, such as the user or group the new permission applies to.",
"items": {
"$ref": "#/components/schemas/PermissionChange"
},
"type": "array"
},
"primaryEventType": {
"description": "The main type of event that occurred.",
"enum": [
"comment",
"create",
"edit",
"emptyTrash",
"move",
"permissionChange",
"rename",
"trash",
"unknown",
"untrash",
"upload"
],
"type": "string"
},
"rename": {
"$ref": "#/components/schemas/Rename",
"description": "Extra information for rename type events, such as the old and new names."
},
"target": {
"$ref": "#/components/schemas/Target",
"description": "Information specific to the Target object modified by the event."
},
"user": {
"$ref": "#/components/schemas/User",
"description": "Represents the user responsible for the event."
}
},
"type": "object"
},
"ListActivitiesResponse": {
"description": "The response from the list request. Contains a list of activities and a token to retrieve the next page of results.",
"properties": {
"activities": {
"description": "List of activities.",
"items": {
"$ref": "#/components/schemas/Activity"
},
"type": "array"
},
"nextPageToken": {
"description": "Token for the next page of results.",
"type": "string"
}
},
"type": "object"
},
"Move": {
"description": "Contains information about changes in an object's parents as a result of a move type event.",
"properties": {
"addedParents": {
"description": "The added parent(s).",
"items": {
"$ref": "#/components/schemas/Parent"
},
"type": "array"
},
"removedParents": {
"description": "The removed parent(s).",
"items": {
"$ref": "#/components/schemas/Parent"
},
"type": "array"
}
},
"type": "object"
},
"Parent": {
"description": "Contains information about a parent object. For example, a folder in Drive is a parent for all files within it.",
"properties": {
"id": {
"description": "The parent's ID.",
"type": "string"
},
"isRoot": {
"description": "Whether this is the root folder.",
"type": "boolean"
},
"title": {
"description": "The parent's title.",
"type": "string"
}
},
"type": "object"
},
"Permission": {
"description": "Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object.",
"properties": {
"name": {
"description": "The name of the user or group the permission applies to.",
"type": "string"
},
"permissionId": {
"description": "The ID for this permission. Corresponds to the Drive API's permission ID returned as part of the Drive Permissions resource.",
"type": "string"
},
"role": {
"description": "Indicates the Google Drive permissions role. The role determines a user's ability to read, write, or comment on the file.",
"enum": [
"commenter",
"fileOrganizer",
"owner",
"publishedReader",
"reader",
"writer"
],
"type": "string"
},
"type": {
"description": "Indicates how widely permissions are granted.",
"enum": [
"anyone",
"domain",
"group",
"user"
],
"type": "string"
},
"user": {
"$ref": "#/components/schemas/User",
"description": "The user's information if the type is USER."
},
"withLink": {
"description": "Whether the permission requires a link to the file.",
"type": "boolean"
}
},
"type": "object"
},
"PermissionChange": {
"description": "Contains information about a Drive object's permissions that changed as a result of a permissionChange type event.",
"properties": {
"addedPermissions": {
"description": "Lists all Permission objects added.",
"items": {
"$ref": "#/components/schemas/Permission"
},
"type": "array"
},
"removedPermissions": {
"description": "Lists all Permission objects removed.",
"items": {
"$ref": "#/components/schemas/Permission"
},
"type": "array"
}
},
"type": "object"
},
"Photo": {
"description": "Photo information for a user.",
"properties": {
"url": {
"description": "The URL of the photo.",
"type": "string"
}
},
"type": "object"
},
"Rename": {
"description": "Contains information about a renametype event.",
"properties": {
"newTitle": {
"description": "The new title.",
"type": "string"
},
"oldTitle": {
"description": "The old title.",
"type": "string"
}
},
"type": "object"
},
"Target": {
"description": "Information about the object modified by the event.",
"properties": {
"id": {
"description": "The ID of the target. For example, in Google Drive, this is the file or folder ID.",
"type": "string"
},
"mimeType": {
"description": "The MIME type of the target.",
"type": "string"
},
"name": {
"description": "The name of the target. For example, in Google Drive, this is the title of the file.",
"type": "string"
}
},
"type": "object"
},
"User": {
"description": "A representation of a user.",
"properties": {
"isDeleted": {
"description": "A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.",
"type": "boolean"
},
"isMe": {
"description": "Whether the user is the authenticated user.",
"type": "boolean"
},
"name": {
"description": "The displayable name of the user.",
"type": "string"
},
"permissionId": {
"description": "The permission ID associated with this user. Equivalent to the Drive API's permission ID for this user, returned as part of the Drive Permissions resource.",
"type": "string"
},
"photo": {
"$ref": "#/components/schemas/Photo",
"description": "The profile photo of the user. Not present if the user has no profile photo."
}
},
"type": "object"
}
},
"securitySchemes": {
"Oauth2": {
"description": "Oauth 2.0 implicit authentication",
"flows": {
"implicit": {
"authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
"scopes": {
"https://www.googleapis.com/auth/activity": "View the activity history of your Google apps"
}
}
},
"type": "oauth2"
},
"Oauth2c": {
"description": "Oauth 2.0 authorizationCode authentication",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
"scopes": {
"https://www.googleapis.com/auth/activity": "View the activity history of your Google apps"
},
"tokenUrl": "https://accounts.google.com/o/oauth2/token"
}
},
"type": "oauth2"
}
}
}
}