Help Center/ Object Storage Service/ API Reference/ Object APIs/ Operations on Multipart Upload/ Listing Initiated Multipart Uploads in a Bucket
Updated on 2026-05-26 GMT+08:00

Listing Initiated Multipart Uploads in a Bucket

Function

You can call this API to query all initiated multipart uploads that have not been completed or aborted in a bucket. For more information about multipart uploads, see Multipart Upload.

Constraints

  • Folders do not support multipart upload.
  • Each request can upload only one part, but multiple requests can be initiated at the same time.
  • Constraints on parts:
    Table 1 Constraints on parts

    Item

    Constraints

    Maximum object size

    48.8 TB

    Maximum number of parts for each upload task

    10,000

    Part number

    1 to 10,000 (inclusive)

    Part size

    5 MB to 5 GB. The size of the last part is between 0 bytes to 5 GB.

    Maximum number of parts returned in response to the request for listing uploaded parts

    1,000

    Maximum number of multipart uploads returned in response to the request for listing initiated multipart uploads

    1,000

  • If you use SSE-C in a multipart upload, you must include the key in the requests for initiating the multipart upload, uploading parts, and copying parts. All requests in this multipart upload must use the same key. The key is not required for completing the multipart upload. The complete object is encrypted using SSE-C.
  • If you use SSE-KMS or SSE-OBS in a multipart upload, you only need to configure the encryption method, algorithm, and key in initiating the multipart upload.

Authorization

To call this API, you must be the bucket owner or have the permission to list initiated multipart uploads in a bucket. You are advised to use IAM or bucket policies for authorization. For details about OBS authorization methods, see Differences Between OBS Permissions Control Methods.

  • If you use IAM for authorization, you need to use either role/policy-based authorization or identity policy-based authorization and configure the required permissions:
    • If you use role/policy-based authorization (IAM v3 APIs in the old IAM version), you must have the obs:bucket:ListBucketMultipartUploads permission. For details, see Creating a Custom IAM Policy.
    • If you use identity policy-based authorization (IAM v5 APIs in the new IAM version), you must have the obs:bucket:listBucketMultipartUploads permission, as shown in the following table. For details, see Creating a Custom IAM Identity Policy.

      Action

      Access Level

      Resource Type (*: Required)

      Condition Key

      Alias

      Dependencies

      obs:bucket:listBucketMultipartUploads

      List

      bucket *

      -

      -

      -

      • obs:EpochTime
      • obs:SourceIp
      • obs:TlsVersion
      • obs:CustomDomain
  • If you use bucket policies for authorization, you must have the obs:bucket:ListBucketMultipartUploads permission. For details, see Creating a Custom Bucket Policy.

URI

GET /

Calling Method

For details, see Calling APIs. Before calling this API, calculate the API signature and add it to the request.

You can debug this API in API Explorer.

Request Syntax

GET /?uploads&max-uploads=max HTTP/1.1 
Host: bucketname.obs.region.myhuaweicloud.com 
Date: date
Authorization: authorization

URI Parameters

This request uses parameters to specify the query range for multipart uploads. Table 2 describes the parameters.

Table 2 URI parameters

Parameter

Mandatory

Type

Description

delimiter

No

String

Definition

For a multipart upload that contains delimiters, the string between the first character and the first delimiter in the object name (excluding the prefix specified in the request, if any) is returned as CommonPrefix. Multipart uploads with objects that contain CommonPrefix are considered as a group and returned as one record. The record contains no information about the tasks, only informing the user that the group involves multipart uploads.

Constraints

N/A

Range

1 to 1,024 characters

Default Value

N/A

prefix

No

String

Definition

Name prefix that the objects of the multipart tasks to be listed must contain. If a prefix is specified, the response only contains tasks whose names start with the prefix value.

Constraints

The value must comply with the format of the object name.

Range

1 to 1,024 characters

Default Value

N/A

max-uploads

No

Integer

Definition

Maximum number of multipart tasks that can be listed at a time. Unit: count

Constraints

N/A

Range

The value ranges from 1 to 1000. If the specified value is greater than 1000, only 1,000 objects are returned.

Default Value

1000

key-marker

No

String

Definition

Lists multipart uploads that follow the value of key-marker.

Constraints

N/A

Range

The value of NextKeyMarker in the response body of the last request

Default Value

N/A

upload-id-marker

No

String

Definition

Lists multipart uploads that follow the value of upload-id-marker for key-marker.

Constraints

This parameter is valid only when it is used together with key-marker.

Range

The value of NextUploadIdMarker in the response body of the last request

Default Value

N/A

encoding-type

No

String

Definition

Encoding type for some elements in the response. If Delimiter, KeyMarker, Prefix, NextKeyMarker, and Key contain control characters that are not supported by the XML 1.0 standard, you can set encoding-type to encode Delimiter, KeyMarker, Prefix (including the Prefix in CommonPrefixes), NextKeyMarker, and Key in response.

Constraints

Currently, only URL encoding is supported.

Range

url

Default Value

N/A. If you do not configure this parameter, encoding is not applied.

Request Headers

This request uses common headers. For details, see Table 3.

Request Body

This request contains no request body parameters.

Response Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
HTTP/1.1 status_code
Date: date
Content-Length: length

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<ListMultipartUploadsResult xmlns="http://obs.region.myhuaweicloud.com/doc/2015-06-30/"> 
    <Bucket>bucketname</Bucket> 
    <KeyMarker/> 
    <UploadIdMarker/> 
    <NextKeyMarker>nextMarker</NextKeyMarker> 
    <NextUploadIdMarker>idMarker</NextUploadIdMarker> 
    <MaxUploads>maxUploads</MaxUploads> 
    <IsTruncated>true</IsTruncated> 
    <Upload> 
        <Key>key</Key> 
        <UploadId>uploadID</UploadId> 
        <Initiator> 
            <ID>domainID/domainID:userID/userID</ID> 
        </Initiator> 
        <Owner> 
            <ID>ownerID</ID>
        </Owner> 
        <StorageClass>storageclass</StorageClass> 
        <Initiated>initiatedDate</Initiated>  
    </Upload> 
</ListMultipartUploadsResult>

Response Headers

This response uses common headers. For details, see Table 1.

Response Body

This response contains elements of information about the multipart uploads. Table 3 describes the elements.

Table 3 Response body parameters

Parameter

Type

Description

ListMultipartUploadsResult

Container

Definition

Container for listing multipart upload results. ListMultipartUploadsResult is the parent node of Bucket, KeyMarker, UploadIdMarker, NextKeyMarker, NextUploadIdMarker, MaxUploads, IsTruncated, Upload, Prefix, Delimiter and CommonPrefixes.

Range

For details, see Table 4.

Table 4 Description of the ListMultipartUploadsResult response body

Parameter

Type

Description

Bucket

String

Definition

Name of the bucket to which the multipart upload was initiated

Range

The value can contain 3 to 63 characters.

EncodingType

String

Definition

Encodes some elements in the response based on the specified type. If encoding-type is specified in the request, Delimiter, KeyMarker, Prefix (including the Prefix in CommonPrefixes), NextKeyMarker, and Key in the response will be encoded.

Range

url

KeyMarker

String

Definition

Object key where the multipart upload listing begins

Range

1 to 1,024 characters

UploadIdMarker

String

Definition

Upload ID where the multipart upload listing begins

Range

The value must contain 1 to 32 characters.

NextKeyMarker

String

Definition

Value of KeyMarker in a subsequent request if a multipart upload list is truncated

Range

1 to 1,024 characters

NextUploadIdMarker

String

Definition

Value of UploadMarker in a subsequent request if a multipart upload list is truncated.

Range

The value must contain 1 to 32 characters.

MaxUploads

Integer

Definition

Maximum of multipart uploads to be returned at a time Unit: count

Range

The value ranges from 1 to 1000. If the value is out of the range, the default value 1000 is used.

IsTruncated

Boolean

Definition

Whether the returned list is truncated.

Range

  • true: Not all results are returned.
  • false: All results are returned.

Upload

Container

Definition

Container for storing multipart upload information. Upload is the parent node of Key, UploadId, Initiator, Owner, StorageClass, and Initiated.

Range

For details, see Table 5.

ListMultipartUploadsResult.Prefix

String

Definition

Prefix carried in a request.

Range

1 to 1,024 characters

Delimiter

String

Definition

Delimiter in a request.

Range

The value must contain 1 to 1,024 characters.

CommonPrefixes

Container

Definition

Indicates group information. If you specify a delimiter in the request, the response contains group information in CommonPrefixes. CommonPrefixes is the parent node of Prefix.

Range

For details, see Table 8.

Table 5 Description of the Upload response body

Parameter

Type

Description

Key

String

Definition

Name of the object in the initiated multipart upload.

Range

1 to 1,024 characters

UploadId

String

Definition

ID of the multipart upload

Range

The value must contain 1 to 32 characters.

Initiator

Container

Definition

Creator of the multipart upload task. Initiator is a parent node of ID.

Range

For details, see Table 6.

Owner

Container

Definition

Owner of the part. Owner is a parent node of ID.

Range

For details, see Table 7.

StorageClass

String

Definition

Indicates the storage class that will be used for an object to be uploaded in parts.

Range

  • STANDARD: Standard storage
  • WARM: Infrequent Access storage
  • COLD: Archive storage
  • DEEP_ARCHIVE: Deep Archive storage

Initiated

Date

Definition

Indicates the time (UTC) when the multipart upload task is initiated. The date is in the ISO8601 format, for example, 2018-01-01T00:00:00.000Z.

Range

N/A

Table 6 Description of the Initiator response body

Parameter

Type

Description

ID

String

Definition

URN of the multipart upload initiator. The format is domainID/{domainId}:userID/{userId}.

Range

N/A

Table 7 Description of the Owner response body

Parameter

Type

Description

ID

String

Definition

Domain ID of the multipart upload initiator. The format is {domainId}.

Range

N/A

Table 8 Description of the CommonPrefixes response body

Parameter

Type

Description

CommonPrefixes. Prefix

String

Definition

Indicates different prefixes in the CommonPrefixes group information.

Range

N/A

Error Responses

If the value of maxUploads is a non-integer or smaller than 0, OBS returns 400 Bad Request.

Other errors are included in Table 2.

Sample Request: Listing Initiated Multipart Uploads

1
2
3
4
5
6
GET /?uploads HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date: WED, 01 Jul 2015 04:51:21 GMT
Authorization: OBS UDSIAMSTUBTEST000008:XdmZgYQ+ZVy1rjxJ9/KpKq+wrU0=

Sample Response: Listing Initiated Multipart Uploads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: 8DF400000163D405534D046A2295674C
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSDaHP+a+Bp0RI6Mm9XvCOrf7q3qvBQW
Content-Type: application/xml
Date: WED, 01 Jul 2015 04:51:21 GMT
Content-Length: 681

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListMultipartUploadsResult xmlns="http://obs.ap-southeast-1.myhuaweicloud.com/doc/2015-06-30/">
  <Bucket>examplebucket</Bucket>
  <KeyMarker/>
  <UploadIdMarker/>
  <Delimiter/>
  <Prefix/>
  <MaxUploads>1000</MaxUploads>
  <IsTruncated>false</IsTruncated>
  <Upload>
    <Key>obj2</Key>
    <UploadId>00000163D40171ED8DF4050919BD02B8</UploadId>
    <Initiator>
      <ID>domainID/b4bf1b36d9ca43d984fbcb9491b6fce9:userID/71f390117351534r88115ea2c26d1999</ID>
    </Initiator>
    <Owner>
      <ID>b4bf1b36d9ca43d984fbcb9491b6fce9</ID>
    </Owner>
    <StorageClass>STANDARD</StorageClass>
    <Initiated>2015-07-01T02:30:54.582Z</Initiated>
  </Upload>
</ListMultipartUploadsResult>

Sample Request: Listing Initiated Multipart Uploads (with a Prefix and Delimiter Specified)

The following example describes how to list two initiated multipart uploads (with objects multipart-object001 and part2-key02 in bucket examplebucket). In this listing operation, prefix is set to multipart and delimiter is set to object001.

GET /?uploads&delimiter=object001&prefix=multipart HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date: WED, 01 Jul 2015 04:51:21 GMT
Authorization: OBS UDSIAMSTUBTEST000008:XdmZgYQ+ZVy1rjxJ9/KpKq+wrU0=

Sample Response: Listing Initiated Multipart Uploads (with a Prefix and Delimiter Specified)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: 5DEB00000164A27A1610B8250790D703
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSq3ls2ZtLDD6pQLcJq1yGITXgspSvBR
Content-Type: application/xml
Date: WED, 01 Jul 2015 04:51:21 GMT
Content-Length: 681
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListMultipartUploadsResult xmlns="http://obs.ap-southeast-1.myhuaweicloud.com/doc/2015-06-30/">
  <Bucket>newbucket0001</Bucket>
  <KeyMarker></KeyMarker>
  <UploadIdMarker>
  </UploadIdMarker>
  <Delimiter>object</Delimiter>
  <Prefix>multipart</Prefix>
  <MaxUploads>1000</MaxUploads>
  <IsTruncated>false</IsTruncated>
  <CommonPrefixes>
    <Prefix>multipart-object001</Prefix>
  </CommonPrefixes>
</ListMultipartUploadsResult>

Using SDKs to Call APIs

You are advised to use OBS SDKs to call APIs. SDKs encapsulate APIs to simplify development. You can call SDK API functions to access OBS without manually calculating signatures.

Helpful Links