Method: googleapis.storage.v1.objects.list

Retrieves a list of objects matching the criteria.

Arguments

Parameters
bucket

string

Required. Name of the bucket in which to look for objects.

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).

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 (uint32 format)

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

enum

Set of properties to return. Defaults to noAcl.

Enum type. Can be one of the following:
fullInclude all properties.
noAclOmit the owner, acl property.
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.

Raised exceptions

Exceptions
ConnectionErrorIn case of a network problem (such as DNS failure or refused connection).
HttpErrorIf the response status is >= 400 (excluding 429 and 503).
TimeoutErrorIf a long-running operation takes longer to finish than the specified timeout limit.
TypeErrorIf an operation or function receives an argument of the wrong type.
ValueErrorIf an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout.

Response

If successful, the response contains an instance ofObjects.

Subworkflow snippet

Some fields might be optional or required.To identify required fields, refer to theAPI documentation.

YAML

-list:call:googleapis.storage.v1.objects.listargs:bucket:...delimiter:...endOffset:...includeTrailingDelimiter:...matchGlob:...maxResults:...pageToken:...prefix:...projection:...startOffset:...userProject:...versions:...result:listResult

JSON

[{"list":{"call":"googleapis.storage.v1.objects.list","args":{"bucket":"...","delimiter":"...","endOffset":"...","includeTrailingDelimiter":"...","matchGlob":"...","maxResults":"...","pageToken":"...","prefix":"...","projection":"...","startOffset":"...","userProject":"...","versions":"..."},"result":"listResult"}}]

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.