objects

GET /b/{bucket}/o

Changed on

Retrieves a list of objects matching the criteria.

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 to look for objects.

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.

delimiter, string

Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.

endOffset, string

Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).

filter, string

Filter the returned objects. Currently only supported for the contexts field. If delimiter is set, the returned prefixes are exempt from this filter.

includeFoldersAsPrefixes, boolean

Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.

includeTrailingDelimiter, boolean

If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.

matchGlob, string

Filter results to objects and prefixes that match this glob pattern.

maxResults, integer

Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.

pageToken, string

A previously-returned page token representing part of the larger set of results to view.

prefix, string

Filter results to objects whose names begin with this prefix.

projection, 'full' | 'noAcl'

Set of properties to return. Defaults to noAcl.

softDeleted, boolean

If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.

startOffset, string

Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).

userProject, string

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

versions, boolean

If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.

Response

Successful response

Objects required

A list of objects.

items, Object[]

The list of items.

kind, string

The kind of item this is. For lists of objects, this is always storage#objects.

nextPageToken, string

The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.

prefixes, string[]

The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.

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