Graphon API

ListObjectsV2

Lists the objects in a bucket, one page at a time.

GET/{bucket}?list-type=2

Returns the current version of each object, in key order. Use prefix and delimiter to browse keys like folders.

Role
Viewer or higher
Support
Supported
  • prefix, delimiter, continuation-token, start-after, max-keys, and encoding-type.
  • max-keys counts the keys in Contents plus the common prefixes. A common prefix is one entry, however many keys it holds, and it appears on one page only.
  • Storage ignores fetch-owner. Contents has no Owner.

Path parameters

bucketstringrequired

The bucket name.

Query parameters

list-typestringrequired

Send 2. It selects this operation.

prefixstringoptional

Return only keys that start with this value.

delimiterstringoptional

Group the keys that contain this value after the prefix into CommonPrefixes. Usually /.

max-keysintegeroptional

The most keys to return. Storage clamps the value to 1 through 1,000.

Default: 1000

continuation-tokenstringoptional

The NextContinuationToken of the previous page. Send it to get the next page.

start-afterstringoptional

Return only keys after this key.

encoding-typestringoptional

Send url to percent-encode the keys, prefixes, and delimiter in the response.

url
Percent-encode the values. / stays as it is.

Headers

The workspace ID that must own the bucket. Another owner returns 403 AccessDenied.

Responses

200OK

One page of objects.

application/xml

ListBucketResultobjectrequired

The root element.

Namestring

The bucket name.

Prefixstring

The prefix of the request.

Delimiterstring

The delimiter of the request.

Present when the request sent encoding-type.

KeyCountinteger

The number of Contents and CommonPrefixes elements.

MaxKeysinteger

The page size that storage used.

true when more keys follow.

Present when IsTruncated is true. Send it as continuation-token.

One element for each object.

One element for each group of keys.

Errors

Select an error in the response example to see its XML body. Any request can also get the common errors, such as SignatureDoesNotMatch.

404NoSuchBucket

No bucket has this name, or the bucket was deleted.

What to do: Check the bucket name. ListBuckets shows the buckets of the workspace.

403AccessDenied

The key does not have the role for this operation, or the bucket is in another workspace.

What to do: Use a key of the workspace that owns the bucket, with the role above.

Was this page helpful?
View as Markdown