Search + K

Command Palette

Search for a command to run...

Sign In

drive.permissions.list

GET /files/{fileId}/permissions
Copy endpoint
https://www.googleapis.com/drive/v3

Lists a file's or shared drive's permissions. For more information, see Share files, folders, and drives.

Parameters

path Path Parameters

Name Type
fileId required

The ID of the file or shared drive.

string

query Query Parameters

Name Type
includePermissionsForView

Specifies which additional view's permissions to include in the response. Only published is supported.

string
pageSize

The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.

number
pageToken

The token for continuing a previous list request on the next page. This should be set to the value of nextPageToken from the previous response.

string
supportsAllDrives

Whether the requesting application supports both My Drives and shared drives.

boolean
supportsTeamDrives

Deprecated: Use supportsAllDrives instead.

boolean
useDomainAdminAccess

Issue the request as a domain administrator. If set to true, and if the following additional conditions are met, the requester is granted access: 1. The file ID parameter refers to a shared drive. 2. The requester is an administrator of the domain to which the shared drive belongs. For more information, see Manage shared drives as domain administrators.

boolean
access_token

OAuth access token.

string
alt

Data format for response.

"json" | "media" | "proto"
callback

JSONP

string
fields

Selector specifying which fields to include in a partial response.

string
key

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.

string
oauth_token

OAuth 2.0 token for the current user.

string
prettyPrint

Returns response with indentations and line breaks.

boolean
quotaUser

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.

string
upload_protocol

Upload protocol for media (e.g. "raw", "multipart").

string
uploadType

Legacy upload protocol for media (e.g. "media", "multipart").

string
$.xgafv

V1 error format.

"1" | "2"

Responses

200 */*

Successful response

interface PermissionList {
kind?: string;
nextPageToken?: string;
permissions?: Permission

A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. For more information, see Share files, folders, and drives. By default, permission requests only return a subset of fields. Permission kind, ID, type, and role are always returned. To retrieve specific fields, see Return specific fields. Some resource methods (such as permissions.update) require a permissionId. Use the permissions.list method to retrieve the ID for a file, folder, or shared drive.

interface Permission {
allowFileDiscovery?: boolean;
deleted?: boolean;
displayName?: string;
domain?: string;
emailAddress?: string;
expirationTime?: string;
id?: string;
inheritedPermissionsDisabled?: boolean;
kind?: string;
pendingOwner?: boolean;
permissionDetails?: readonly {
inherited?: boolean;
inheritedFrom?: string;
permissionType?: string;
role?: string;
}
[]
;
photoLink?: string;
role?: string;
teamDrivePermissionDetails?: readonly {
inherited?: boolean;
inheritedFrom?: string;
role?: string;
teamDrivePermissionType?: string;
}
[]
;
type?: string;
view?: string;
}
[]
;
}