Listing Initiated Multipart Uploads in a Bucket
Functions
You can use this API to query all initiated multipart uploads that have not been completed or canceled in a bucket. For details about the multipart upload process, see Multipart Upload.
Request Syntax
GET /?uploads&max-uploads=max HTTP/1.1 Host: bucketname.obs.region.myhuaweicloud.com Date: date Authorization: authorization
Request Parameters
This request uses parameters to specify the query range for multipart uploads. Table 1 describes the parameters.
Parameter |
Mandatory (Yes/No) |
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) are 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: None Range: 1 to 1,024 characters Default value: None |
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: None |
max-uploads |
No |
Integer |
Definition: Maximum number of multipart tasks that can be listed at a time. Unit: count Constraints: None 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: None Range: The value of NextKeyMarker in the response body of the last request Default value: None |
upload-id-marker |
No |
String |
Definition: Lists multipart uploads that follow the value of upload-id-marker of 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: None |
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: None. If you do not configure this parameter, encoding is not applied. |
Request Headers
This request uses common headers. For details, see Table 3.
Request Elements
This request involves no elements.
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
The response to the request uses common headers. For details, see Table 1.
Response Elements
This response contains elements of information about the multipart uploads. Table 2 describes the elements.
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 3. |
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 is a string greater than 0 and less than or equal to 32. |
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 is a string greater than 0 and less than or equal to 32. |
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:
|
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 4. |
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 is a string of 1 to 1024 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 7. |
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 the parent node of ID. Range: For details, see Table 5. |
Owner |
Container |
Definition: Owner of the part. Owner is the parent node of ID. Range: For details, see Table 6. |
StorageClass |
String |
Definition: Indicates the storage class that will be used for an object to be uploaded in parts. Range:
|
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: None |
Parameter |
Type |
Description |
---|---|---|
ID |
String |
Definition: URN of the multipart upload initiator. The format is domainID/{domainId}:userID/{userId}. Range: None |
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 object001 is set to delimiter.
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> |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot