b2_list_parts
  • 11 Sep 2026
  • Dark
    Light

b2_list_parts

  • Dark
    Light

Article summary

Get
/b2api/v4/b2_list_parts

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.

Header parameters
Authorization
stringRequired

An account authorization token, obtained from b2_authorize_account.

The token must have the writeFiles capability.

Query parameters
fileId
stringRequired

The ID returned by b2_start_large_file. This is the file whose parts will be listed.

startPartNumber
string

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.

maxPartCount
string

The maximum number of parts to return from this call. The default value is 100, and the maximum allowed is 1000.

Responses
200

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.

Expand All
object
nextPartNumber
integer

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.

Example3
parts
Array of object

An array of objects, each one describing one part. (See below.)

Example[ { "file ID": "4_ze73ede9c9c8412db49f60715_f100b4e93fbae6252_d20150824_m224353_c900_v8881000_t0001", "part number": 1, "content length": 100000000, "content sha1": "062685a84ab248d2488f02f6b01b948de2514ad8", "upload timestamp": 1462212185000 }, { "file ID": "4_ze73ede9c9c8412db49f60715_f100b4e93fbae6252_d20150824_m224353_c900_v8881000_t0001", "part number": 2, "content length": 100000000, "content sha1": "cf634751c3d9f6a15344f23cbf13f3fc9542addf", "upload timestamp": 1462212296000 } ]
object
fileId
string

The file ID for uploading this file.

partNumber
integer

Which part this is.

contentLength
integer

The number of bytes stored in the part.

contentSha1
string

The SHA1 of the bytes stored in the part.

contentMd5
string

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.

Exampledc724af18fbdd4e59189f5fe768a5f8311527050
serverSideEncryption
object

When the part is encrypted with Server-Side Encryption, the mode ("SSE-B2" or "SSE-C") and algorithm used to encrypt the data.

Example{ "algorithm": null, "mode": null }
algorithm
string
mode
string
uploadTimestamp
integer

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).

400
statuscodedescription
400bad_bucket_idThe requested bucket ID does not match an existing bucket.
400bad_requestThe request had the wrong fields or illegal values. The message returned with the error will describe the problem.
object
status
integer

The numeric HTTP status code. Always matches the status in the HTTP response.

Example400
code
string

A single-identifier code that identifies the error.

Exampleinvalid_bucket_name
message
string

A human-readable message, in English, saying what went wrong.

Examplebucket name is too long
401
statuscodedescription
401bad_auth_tokenThe auth token used is not valid. Call b2_authorize_account again to either get a new one, or an error message describing the problem.
401expired_auth_tokenThe auth token used has expired. Call b2_authorize_account again to get a new one.
401unauthorizedThe 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.
403
statuscodedescription
403transaction_cap_exceededTransaction cap exceeded. Daily transaction caps apply to non-paying accounts. To view or adjust your caps, sign in to your B2 Cloud Storage account online and select the Caps & Alerts link in the B2 Cloud Storage section of the sidebar.

Was this article helpful?