UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 21.4 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"Provides a historical view of activity in Google Drive.","title":"Drive Activity","version":"v2","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-logo":{"url":"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.18"},"format":"google","url":"https://driveactivity.googleapis.com/$discovery/rest?version=v2","version":"v1"}],"x-preferred":true,"x-providerName":"googleapis.com","x-serviceName":"driveactivity"},"externalDocs":{"url":"https://developers.google.com/drive/activity/"},"tags":[{"name":"activity"}],"paths":{"/v2/activity:query":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Query past activity in Google Drive.","operationId":"driveactivity.activity.query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDriveActivityRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/QueryDriveActivityResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/drive.activity"]},{"Oauth2":["https://www.googleapis.com/auth/drive.activity.readonly"]}],"tags":["activity"]}}},"servers":[{"url":"https://driveactivity.googleapis.com/"}],"components":{"parameters":{"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"type":"string","enum":["json","media","proto"],"default":"json"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"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","default":true}},"quotaUser":{"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.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}},"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"type":"string","enum":["1","2"]}}},"securitySchemes":{"Oauth2":{"description":"Oauth 2.0 authentication","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","scopes":{"https://www.googleapis.com/auth/drive.activity":"View and add to the activity record of files in your Google Drive","https://www.googleapis.com/auth/drive.activity.readonly":"View the activity record of files in your Google Drive"}}}}},"schemas":{"Action":{"description":"Information about the action.","properties":{"actor":{"$ref":"#/components/schemas/Actor"},"detail":{"$ref":"#/components/schemas/ActionDetail"},"target":{"$ref":"#/components/schemas/Target"},"timeRange":{"$ref":"#/components/schemas/TimeRange"},"timestamp":{"description":"The action occurred at this specific time.","format":"google-datetime","type":"string"}},"type":"object"},"ActionDetail":{"description":"Data describing the type and additional information of an action.","properties":{"comment":{"$ref":"#/components/schemas/Comment"},"create":{"$ref":"#/components/schemas/Create"},"delete":{"$ref":"#/components/schemas/Delete"},"dlpChange":{"$ref":"#/components/schemas/DataLeakPreventionChange"},"edit":{"$ref":"#/components/schemas/Edit"},"move":{"$ref":"#/components/schemas/Move"},"permissionChange":{"$ref":"#/components/schemas/PermissionChange"},"reference":{"$ref":"#/components/schemas/ApplicationReference"},"rename":{"$ref":"#/components/schemas/Rename"},"restore":{"$ref":"#/components/schemas/Restore"},"settingsChange":{"$ref":"#/components/schemas/SettingsChange"}},"type":"object"},"Actor":{"description":"The actor of a Drive activity.","properties":{"administrator":{"$ref":"#/components/schemas/Administrator"},"anonymous":{"$ref":"#/components/schemas/AnonymousUser"},"impersonation":{"$ref":"#/components/schemas/Impersonation"},"system":{"$ref":"#/components/schemas/SystemEvent"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"},"Administrator":{"description":"Empty message representing an administrator.","properties":{},"type":"object"},"AnonymousUser":{"description":"Empty message representing an anonymous user or indicating the authenticated\nuser should be anonymized.","properties":{},"type":"object"},"Anyone":{"description":"Represents any user (including a logged out user).","properties":{},"type":"object"},"ApplicationReference":{"description":"Activity in applications other than Drive.","properties":{"type":{"description":"The reference type corresponding to this event.","enum":["UNSPECIFIED_REFERENCE_TYPE","LINK","DISCUSS"],"type":"string"}},"type":"object"},"Assignment":{"description":"A comment with an assignment.","properties":{"subtype":{"description":"The sub-type of this event.","enum":["SUBTYPE_UNSPECIFIED","ADDED","DELETED","REPLY_ADDED","REPLY_DELETED","RESOLVED","REOPENED","REASSIGNED"],"type":"string"}},"type":"object"},"Comment":{"description":"A change about comments on an object.","properties":{"assignment":{"$ref":"#/components/schemas/Assignment"},"mentionedUsers":{"description":"Users who are mentioned in this comment.","items":{"$ref":"#/components/schemas/User"},"type":"array"},"post":{"$ref":"#/components/schemas/Post"},"suggestion":{"$ref":"#/components/schemas/Suggestion"}},"type":"object"},"ConsolidationStrategy":{"description":"How the individual activities are consolidated. A set of activities may be\nconsolidated into one combined activity if they are related in some way, such\nas one actor performing the same action on multiple targets, or multiple\nactors performing the same action on a single target. The strategy defines\nthe rules for which activities are related.","properties":{"legacy":{"$ref":"#/components/schemas/Legacy"},"none":{"$ref":"#/components/schemas/NoConsolidation"}},"type":"object"},"Copy":{"description":"An object was created by copying an existing object.","properties":{"originalObject":{"$ref":"#/components/schemas/TargetReference"}},"type":"object"},"Create":{"description":"An object was created.","properties":{"copy":{"$ref":"#/components/schemas/Copy"},"new":{"$ref":"#/components/schemas/New"},"upload":{"$ref":"#/components/schemas/Upload"}},"type":"object"},"DataLeakPreventionChange":{"description":"A change in the object's data leak prevention status.","properties":{"type":{"description":"The type of Data Leak Prevention (DLP) change.","enum":["TYPE_UNSPECIFIED","FLAGGED","CLEARED"],"type":"string"}},"type":"object"},"Delete":{"description":"An object was deleted.","properties":{"type":{"description":"The type of delete action taken.","enum":["TYPE_UNSPECIFIED","TRASH","PERMANENT_DELETE"],"type":"string"}},"type":"object"},"DeletedUser":{"description":"A user whose account has since been deleted.","properties":{},"type":"object"},"Domain":{"description":"Information about a domain.","properties":{"legacyId":{"description":"An opaque string used to identify this domain.","type":"string"},"name":{"description":"The name of the domain, e.g. \"google.com\".","type":"string"}},"type":"object"},"DriveActivity":{"description":"A single Drive activity comprising one or more Actions by one or more\nActors on one or more Targets. Some Action groupings occur spontaneously,\nsuch as moving an item into a shared folder triggering a permission change.\nOther groupings of related Actions, such as multiple Actors editing one item\nor moving multiple files into a new folder, are controlled by the selection\nof a ConsolidationStrategy in the QueryDriveActivityRequest.","properties":{"actions":{"description":"Details on all actions in this activity.","items":{"$ref":"#/components/schemas/Action"},"type":"array"},"actors":{"description":"All actor(s) responsible for the activity.","items":{"$ref":"#/components/schemas/Actor"},"type":"array"},"primaryActionDetail":{"$ref":"#/components/schemas/ActionDetail"},"targets":{"description":"All Drive objects this activity is about (e.g. file, folder, Team Drive).\nThis represents the state of the target immediately after the actions\noccurred.","items":{"$ref":"#/components/schemas/Target"},"type":"array"},"timeRange":{"$ref":"#/components/schemas/TimeRange"},"timestamp":{"description":"The activity occurred at this specific time.","format":"google-datetime","type":"string"}},"type":"object"},"DriveItem":{"description":"A Drive item, such as a file or folder.","properties":{"file":{"$ref":"#/components/schemas/File"},"folder":{"$ref":"#/components/schemas/Folder"},"mimeType":{"description":"The MIME type of the Drive item. See\nhttps://developers.google.com/drive/v3/web/mime-types.","type":"string"},"name":{"description":"The target Drive item. The format is \"items/ITEM_ID\".","type":"string"},"owner":{"$ref":"#/components/schemas/Owner"},"title":{"description":"The title of the Drive item.","type":"string"}},"type":"object"},"DriveItemReference":{"description":"A lightweight reference to a Drive item, such as a file or folder.","properties":{"file":{"$ref":"#/components/schemas/File"},"folder":{"$ref":"#/components/schemas/Folder"},"name":{"description":"The target Drive item. The format is \"items/ITEM_ID\".","type":"string"},"title":{"description":"The title of the Drive item.","type":"string"}},"type":"object"},"Edit":{"description":"An empty message indicating an object was edited.","properties":{},"type":"object"},"File":{"description":"A Drive item which is a file.","properties":{},"type":"object"},"FileComment":{"description":"A comment on a file.","properties":{"legacyCommentId":{"description":"The comment in the discussion thread. This identifier is an opaque string\ncompatible with the Drive API; see\nhttps://developers.google.com/drive/v3/reference/comments/get","type":"string"},"legacyDiscussionId":{"description":"The discussion thread to which the comment was added. This identifier is an\nopaque string compatible with the Drive API and references the first\ncomment in a discussion; see\nhttps://developers.google.com/drive/v3/reference/comments/get","type":"string"},"linkToDiscussion":{"description":"The link to the discussion thread containing this comment, for example,\n\"https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID\".","type":"string"},"parent":{"$ref":"#/components/schemas/DriveItem"}},"type":"object"},"Folder":{"description":"A Drive item which is a folder.","properties":{"type":{"description":"The type of Drive folder.","enum":["TYPE_UNSPECIFIED","MY_DRIVE_ROOT","TEAM_DRIVE_ROOT","STANDARD_FOLDER"],"type":"string"}},"type":"object"},"Group":{"description":"Information about a group.","properties":{"email":{"description":"The email address of the group.","type":"string"},"title":{"description":"The title of the group.","type":"string"}},"type":"object"},"Impersonation":{"description":"Information about an impersonation, where an admin acts on behalf of an end\nuser. Information about the acting admin is not currently available.","properties":{"impersonatedUser":{"$ref":"#/components/schemas/User"}},"type":"object"},"KnownUser":{"description":"A known user.","properties":{"isCurrentUser":{"description":"True if this is the user making the request.","type":"boolean"},"personName":{"description":"The identifier for this user that can be used with the People API to get\nmore information. The format is \"people/ACCOUNT_ID\". See\nhttps://developers.google.com/people/.","type":"string"}},"type":"object"},"Legacy":{"description":"A strategy which consolidates activities using the grouping rules from the\nlegacy V1 Activity API. Similar actions occurring within a window of time\ncan be grouped across multiple targets (such as moving a set of files at\nonce) or multiple actors (such as several users editing the same item).\nGrouping rules for this strategy are specific to each type of action.","properties":{},"type":"object"},"Move":{"description":"An object was moved.","properties":{"addedParents":{"description":"The added parent object(s).","items":{"$ref":"#/components/schemas/TargetReference"},"type":"array"},"removedParents":{"description":"The removed parent object(s).","items":{"$ref":"#/components/schemas/TargetReference"},"type":"array"}},"type":"object"},"New":{"description":"An object was created from scratch.","properties":{},"type":"object"},"NoConsolidation":{"description":"A strategy which does no consolidation of individual activities.","properties":{},"type":"object"},"Owner":{"description":"Information about the owner of a Drive item.","properties":{"domain":{"$ref":"#/components/schemas/Domain"},"teamDrive":{"$ref":"#/components/schemas/TeamDriveReference"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"},"Permission":{"description":"The permission setting of an object.","properties":{"allowDiscovery":{"description":"If true, the item can be discovered (e.g. in the user's \"Shared with me\"\ncollection) without needing a link to the item.","type":"boolean"},"anyone":{"$ref":"#/components/schemas/Anyone"},"domain":{"$ref":"#/components/schemas/Domain"},"group":{"$ref":"#/components/schemas/Group"},"role":{"description":"Indicates the\n<a href=\"/drive/web/manage-sharing#roles\">Google Drive permissions\nrole</a>. The role determines a user's ability to read, write, and\ncomment on items.","enum":["ROLE_UNSPECIFIED","OWNER","ORGANIZER","FILE_ORGANIZER","EDITOR","COMMENTER","VIEWER","PUBLISHED_VIEWER"],"type":"string"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"},"PermissionChange":{"description":"A change of the permission setting on an item.","properties":{"addedPermissions":{"description":"The set of permissions added by this change.","items":{"$ref":"#/components/schemas/Permission"},"type":"array"},"removedPermissions":{"description":"The set of permissions removed by this change.","items":{"$ref":"#/components/schemas/Permission"},"type":"array"}},"type":"object"},"Post":{"description":"A regular posted comment.","properties":{"subtype":{"description":"The sub-type of this event.","enum":["SUBTYPE_UNSPECIFIED","ADDED","DELETED","REPLY_ADDED","REPLY_DELETED","RESOLVED","REOPENED"],"type":"string"}},"type":"object"},"QueryDriveActivityRequest":{"description":"The request message for querying Drive activity.","properties":{"ancestorName":{"description":"Return activities for this Drive folder and all children and descendants.\nThe format is \"items/ITEM_ID\".","type":"string"},"consolidationStrategy":{"$ref":"#/components/schemas/ConsolidationStrategy"},"filter":{"description":"The filtering for items returned from this query request. The format of the\nfilter string is a sequence of expressions, joined by an optional \"AND\",\nwhere each expression is of the form \"field operator value\".\n\nSupported fields:\n\n - <tt>time</tt>: Uses numerical operators on date values either in\n terms of milliseconds since Jan 1, 1970 or in RFC 3339 format.\n Examples:\n - <tt>time > 1452409200000 AND time <= 1492812924310</tt>\n - <tt>time >= \"2016-01-10T01:02:03-05:00\"</tt>\n\n - <tt>detail.action_detail_case</tt>: Uses the \"has\" operator (:) and\n either a singular value or a list of allowed action types enclosed in\n parentheses.\n Examples:\n - <tt>detail.action_detail_case: RENAME</tt>\n - <tt>detail.action_detail_case:(CREATE UPLOAD)</tt>\n - <tt>-detail.action_detail_case:MOVE</tt>","type":"string"},"itemName":{"description":"Return activities for this Drive item. The format is\n\"items/ITEM_ID\".","type":"string"},"pageSize":{"description":"The requested number of activity to return. If not set, a default value\nwill be used.","format":"int32","type":"integer"},"pageToken":{"description":"The next_page_token value returned from a previous QueryDriveActivity\nrequest, if any.","type":"string"}},"type":"object"},"QueryDriveActivityResponse":{"description":"Response message for querying Drive activity.","properties":{"activities":{"description":"List of activity requested.","items":{"$ref":"#/components/schemas/DriveActivity"},"type":"array"},"nextPageToken":{"description":"Token to retrieve the next page of results, or\nempty if there are no more results in the list.","type":"string"}},"type":"object"},"Rename":{"description":"An object was renamed.","properties":{"newTitle":{"description":"The new title of the drive object.","type":"string"},"oldTitle":{"description":"The previous title of the drive object.","type":"string"}},"type":"object"},"Restore":{"description":"A deleted object was restored.","properties":{"type":{"description":"The type of restore action taken.","enum":["TYPE_UNSPECIFIED","UNTRASH"],"type":"string"}},"type":"object"},"RestrictionChange":{"description":"Information about restriction policy changes to a feature.","properties":{"feature":{"description":"The feature which had a change in restriction policy.","enum":["FEATURE_UNSPECIFIED","SHARING_OUTSIDE_DOMAIN","DIRECT_SHARING","ITEM_DUPLICATION","DRIVE_FILE_STREAM"],"type":"string"},"newRestriction":{"description":"The restriction in place after the change.","enum":["RESTRICTION_UNSPECIFIED","UNRESTRICTED","FULLY_RESTRICTED"],"type":"string"}},"type":"object"},"SettingsChange":{"description":"Information about settings changes.","properties":{"restrictionChanges":{"description":"The set of changes made to restrictions.","items":{"$ref":"#/components/schemas/RestrictionChange"},"type":"array"}},"type":"object"},"Suggestion":{"description":"A suggestion.","properties":{"subtype":{"description":"The sub-type of this event.","enum":["SUBTYPE_UNSPECIFIED","ADDED","DELETED","REPLY_ADDED","REPLY_DELETED","ACCEPTED","REJECTED","ACCEPT_DELETED","REJECT_DELETED"],"type":"string"}},"type":"object"},"SystemEvent":{"description":"Event triggered by system operations instead of end users.","properties":{"type":{"description":"The type of the system event that may triggered activity.","enum":["TYPE_UNSPECIFIED","USER_DELETION","TRASH_AUTO_PURGE"],"type":"string"}},"type":"object"},"Target":{"description":"Information about the target of activity.","properties":{"driveItem":{"$ref":"#/components/schemas/DriveItem"},"fileComment":{"$ref":"#/components/schemas/FileComment"},"teamDrive":{"$ref":"#/components/schemas/TeamDrive"}},"type":"object"},"TargetReference":{"description":"A lightweight reference to the target of activity.","properties":{"driveItem":{"$ref":"#/components/schemas/DriveItemReference"},"teamDrive":{"$ref":"#/components/schemas/TeamDriveReference"}},"type":"object"},"TeamDrive":{"description":"Information about a Team Drive.","properties":{"name":{"description":"The resource name of the Team Drive. The format is\n\"teamDrives/TEAM_DRIVE_ID\".","type":"string"},"root":{"$ref":"#/components/schemas/DriveItem"},"title":{"description":"The title of the Team Drive.","type":"string"}},"type":"object"},"TeamDriveReference":{"description":"A lightweight reference to a Team Drive.","properties":{"name":{"description":"The resource name of the Team Drive. The format is\n\"teamDrives/TEAM_DRIVE_ID\".","type":"string"},"title":{"description":"The title of the Team Drive.","type":"string"}},"type":"object"},"TimeRange":{"description":"Information about time ranges.","properties":{"endTime":{"description":"The end of the time range.","format":"google-datetime","type":"string"},"startTime":{"description":"The start of the time range.","format":"google-datetime","type":"string"}},"type":"object"},"UnknownUser":{"description":"A user about whom nothing is currently known.","properties":{},"type":"object"},"Upload":{"description":"An object was uploaded into Drive.","properties":{},"type":"object"},"User":{"description":"Information about an end user.","properties":{"deletedUser":{"$ref":"#/components/schemas/DeletedUser"},"knownUser":{"$ref":"#/components/schemas/KnownUser"},"unknownUser":{"$ref":"#/components/schemas/UnknownUser"}},"type":"object"}}}}