GetService (ListBuckets)

Sending a Get request to the server can return all buckets owned by the requester, and “/“ represents the root directory.

Request syntax

GET / HTTP/1.1

Host: oss.aliyuncs.com

Date: GMT Date

Authorization:SignatureValue

Request parameters

When using GetService(ListBuckets), you can prescribe a limit to the list with a prefix, marker, and max-uploads to return partial results.

Name

Description

prefix

Indicates that only the buckets whose names match a specified prefix are returned. If this parameter is not specified, prefix information is not used as a filter.Data type: stringDefault value: None

marker

Indicates that the returned results start with the first entry after the marker in an alphabetical order. If this parameter is not specified, all entries are returned from the start.Data type: stringDefault value: None

max-keys

Limits the maximum number of buckets returned for one request. If this parameter is not specified, the default value 100 is used. The value cannot exceed 1000.Data type: stringDefault value: 100

Response elements

Name

Description

ListAllMyBucketsResult

Container for saving results of the Get Service request.Type: containerSubnode: Owner and BucketsParent node: None

Prefix

Prefix of the returned bucket names for one request. This node is available only when not all buckets are returned.Type: stringParent node: ListAllMyBucketsResult

Marker

Start point of the current GetService(ListBuckets) request. This node is available only when not all buckets are returned.Type: stringParent node: ListAllMyBucketsResult

MaxKeys

The maximum number of returned results for one request. This node is available only when not all buckets are returned.Type: stringParent node: ListAllMyBucketsResult

IsTruncated

Indicates whether all results have been returned. “true” means that not all results are returned this time; “false” means that all results are returned this time. This node is available only when not all buckets are returned.Type: enumerated stringValid values: “true” and “false”Parent node: ListAllMyBucketsResult

NextMarker

To indicate that this can be counted as a marker for the next GetService(ListBuckets) request to return the unreturned results. This node is available only when not all buckets are returned.Type: stringParent node: ListAllMyBucketsResult

Owner

Container used for saving the information about the bucket owner.Type: containerParent node: ListAllMyBucketsResult

Intranet domain name accessed by the ECS in the same region Type: stringParent node: ListAllMyBucketsResult.Buckets.Bucket

StorageClass

Indicates the bucket storage type. “Standard”, “IA”, and “Archive” types are available. (The “Archive” type is only available in some regions currently.)Type: stringParent node: ListAllMyBucketsResult.Buckets.Bucket

Detail analysis

The API of GetService is valid only for those users who have been authenticated.

If no information for user authentication is provided in a request (namely an anonymous access), 403 Forbidden is returned. The error code is “AccessDenied”.

When all buckets are returned, the returned XML does not contain the nodes Prefix, Marker, MaxKeys, IsTruncated, and NextMarker. If some results are not returned yet, the preceding nodes are added, in which NextMarker is used to assign the marker for the successive query.