objects

GET /b/{bucket}/o/{object}/iam/testPermissions

Changed on

Tests a set of permissions on the given object to see which, if any, are held by the caller.

Request

  • Base URL
    https://storage.googleapis.com/storage/v1
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/cloud-platform
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/cloud-platform
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/cloud-platform.read-only
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/cloud-platform.read-only
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/devstorage.full_control
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/devstorage.full_control
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/devstorage.read_only
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/devstorage.read_only
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/devstorage.read_write
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/devstorage.read_write

Path parameters

bucket, string required

Name of the bucket in which the object resides.

object, string required

Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

Query parameters

alt, 'json' | 'media'

Data format for the response.

fields, string

Selector specifying which fields to include in a partial response.

key, string

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_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

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

uploadType, string

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

userIp, string

Deprecated. Please use quotaUser instead.

permissions, string[] required

Permissions to test.

generation, string int64

If present, selects a specific revision of this object (as opposed to the latest version, the default).

userProject, string

The project to be billed for this request. Required for Requester Pays buckets.

Response

Successful response

TestIamPermissionsResponse required

A storage.(buckets|objects|managedFolders).testIamPermissions response.

kind, string

The kind of item this is.

permissions, string[]

The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows:

  • storage.buckets.delete - Delete bucket.
  • storage.buckets.get - Read bucket metadata.
  • storage.buckets.getIamPolicy - Read bucket IAM policy.
  • storage.buckets.create - Create bucket.
  • storage.buckets.list - List buckets.
  • storage.buckets.setIamPolicy - Update bucket IAM policy.
  • storage.buckets.update - Update bucket metadata.
  • storage.objects.delete - Delete object.
  • storage.objects.get - Read object data and metadata.
  • storage.objects.getIamPolicy - Read object IAM policy.
  • storage.objects.create - Create object.
  • storage.objects.list - List objects.
  • storage.objects.setIamPolicy - Update object IAM policy.
  • storage.objects.update - Update object metadata.
  • storage.managedFolders.delete - Delete managed folder.
  • storage.managedFolders.get - Read managed folder metadata.
  • storage.managedFolders.getIamPolicy - Read managed folder IAM policy.
  • storage.managedFolders.create - Create managed folder.
  • storage.managedFolders.list - List managed folders.
  • storage.managedFolders.setIamPolicy - Update managed folder IAM policy.

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/devstorage.read_write was removed from the endpoint's security scheme Oauth2

    1 more change in this revision