- Print
- DarkLight
b2_list_parts
- Print
- DarkLight
PLEASE NOTE:
This API request is now being described as a GET
request and not a POST
request, as was the case in previous versions of our documentation.
We made this update because we believe that an API call that retrieves data and does not alter state is more accurately represented as a GET request.
You may still make a POST request to this endpoint by simply submitting a JSON-formatted request body containing the parameters, with Content-Type
set to application/json
.
Lists the parts that have been uploaded for a large file that has not completed uploading
This call returns at most 1000 entries, but it can be called repeatedly to scan through all of the parts for an upload.
An account authorization token, obtained from b2_authorize_account.
The token must have the writeFiles
capability.
The ID returned by b2_start_large_file. This is the file whose parts will be listed.
The first part to return. If there is a part with this number, it will be returned as the first in the list. If not, the returned list will start with the first part number after this one.
The maximum number of parts to return from this call. The default value is 100, and the maximum allowed is 1000.
The request succeeded.
The response headers include the Content-Type that was specified when the file was uploaded. They also include the X-Bz-FileName and X-Bz-Content-Sha1 headers, plus X-Bz-Info-* headers for any custom file info that was provided with the upload. The X-Bz-FileName uses percent-encoding, as if it were a URL parameter.
What to pass in to startPartNumber
for the next search to continue where this one left off, or null if there are no more files. Note this this may not be the number of an actual part, but using it is guaranteed to find the next file in the bucket.
An array of objects, each one describing one part. (See below.)
The file ID for uploading this file.
Which part this is.
The number of bytes stored in the part.
The SHA1 of the bytes stored in the part.
The MD5 of the bytes stored in the part. Not all parts have an MD5 checksum, so this field is optional, and set to null for parts that do not have one.
When the part is encrypted with Server-Side Encryption, the mode ("SSE-B2" or "SSE-C") and algorithm used to encrypt the data.
This is a UTC time when this part was uploaded. It is a base 10 number of milliseconds since midnight, January 1, 1970 UTC. This fits in a 64 bit integer such as the type "long" in the programming language Java. It is intended to be compatible with Java's time long. For example, it can be passed directly into the java call Date.setTime(long time).
status | code | description |
---|---|---|
400 | bad_bucket_id | The requested bucket ID does not match an existing bucket. |
400 | bad_request | The request had the wrong fields or illegal values. The message returned with the error will describe the problem. |
The numeric HTTP status code. Always matches the status in the HTTP response.
A single-identifier code that identifies the error.
A human-readable message, in English, saying what went wrong.
status | code | description |
---|---|---|
401 | bad_auth_token | The auth token used is not valid. Call b2_authorize_account again to either get a new one, or an error message describing the problem. |
401 | expired_auth_token | The auth token used has expired. Call b2_authorize_account again to get a new one. |
401 | unauthorized | The auth token used is valid, but does not authorize this call with these parameters. The capabilities of an auth token are determined by the application key used with b2_authorize_account. |
status | code | description |
---|---|---|
403 | transaction_cap_exceeded | Transaction cap exceeded. To increase your cap, sign in to your B2 Cloud Storage account online. Then select the Caps & Alerts link in the B2 Cloud Storage section of the sidebar. |