younifyd
Menu

Drive.permissions.list

Lists a file's or shared drive's permissions.

GET/files/{fileId}/permissions

Use it in a workflow

  1. Add a step and choose the Google Drive connector.
  2. Pick the Drive.permissions.list action (under permissions).
  3. Fill in the fields below, then reference the result from later steps as {{drivePermissionsList.response.data}}.

Request

Path parameters

fileIdstringrequired

The ID of the file or shared drive.

Query parameters

altstring

Data format for the response.

One ofjson

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

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.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

userIpstring

Deprecated. Please use quotaUser instead.

includePermissionsForViewstring

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

pageSizeinteger

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.

pageTokenstring

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.

supportsAllDrivesboolean

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

supportsTeamDrivesboolean

Deprecated use supportsAllDrives instead.

useDomainAdminAccessboolean

Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Response

Returns 200 with an object. Read it in later steps with {{drivePermissionsList.response.data.<field>}}.

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#permissionList".

Default "drive#permissionList"

nextPageTokenstring

The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.

permissionsarray<object>

The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.

allowFileDiscoveryboolean

Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.

deletedboolean

Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.

displayNamestring

The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: - user - User's full name, as defined for their Google Account, such as "Joe Smith." - group - Name of the Google Group, such as "The Company Administrators." - domain - String domain name, such as "your-company.com." - anyone - No displayName is present.

domainstring

The domain to which this permission refers. The following options are currently allowed: - The entire domain, such as "your-company.com." - A target audience, such as "ID.audience.googledomains.com."

emailAddressstring

The email address of the user or group to which this permission refers.

expirationTimestring (date-time)

The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: - They cannot be set on shared drive items. - They can only be set on user and group permissions. - The time must be in the future. - The time cannot be more than one year in the future.

idstring

The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#permission".

Default "drive#permission"

pendingOwnerboolean

Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that aren't in a shared drive.

permissionDetailsarray<object>4 fields

Details of whether the permissions on this shared drive item are inherited or are directly on this item. This is an output-only field that's present only for shared drive items.

photoLinkstring

A link to the user's profile photo, if available.

rolestring

The role granted by this permission. While new values may be supported in the future, the following are currently allowed: - owner - organizer - fileOrganizer - writer - commenter - reader

teamDrivePermissionDetailsarray<object>4 fields

Deprecated - use permissionDetails instead.

typestring

The type of the grantee. Valid values are: - user - group - domain - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for the anyone type.

viewstring

Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.

json
{
  "kind": "drive#permissionList",
  "nextPageToken": "string",
  "permissions": [
    {
      "allowFileDiscovery": false,
      "deleted": false,
      "displayName": "string",
      "domain": "string",
      "emailAddress": "string",
      "expirationTime": "2025-01-01T00:00:00Z",
      "id": "string",
      "kind": "drive#permission",
      "pendingOwner": false,
      "permissionDetails": [
        {
          "inherited": false,
          "inheritedFrom": "string",
          "permissionType": "string",
          "role": "string"
        }
      ],
      "photoLink": "string",
      "role": "string"
    }
  ]
}

Need more? See the Google Drive guide for connection setup and behaviour shared by every action.