Download a Bulk Download Job File

get

/documents/api/1.2/folders/{folderId}/_download/{jobId}/package

Download a bulk download zip.

Request

Supported Media Types
Path Parameters
  • Globally unique identifier (GUID) for the folder. If the referenced folder is the user's home folder, the value for folderId is self.

  • Globally unique identifier (GUID) for the bulk download job.

Header Parameters
  • The standard HTTP Range header allows clients to stream parts of the file rather than the entire file. The value of the Range header can be one of the following formats:

    • bytes=startByte - endByte
      For example to receive the first 500 bytes use bytes=0-500
    • bytes=skipBytes-
      For example to skip the first 500 bytes use bytes=500-
    • bytes=-lastBytes
      For example to receive the last 500 bytes use bytes=-500

Back to Top

Response

Supported Media Types

200 Response

Complete data stream of the file contents.

206 Response

Partial data stream of the file contents.

400 Response

The request is invalid as described by the error returned.

403 Response

Forbidden if the user does not have read permission.

416 Response

Requested range cannot be satisfied.

Back to Top

Examples

The following example downloads the zip file:

GET .../documents/api/1.2/folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/11E666917053923171255718EFB36B481614961716028/package

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

Example 2

The following example downloads the first 1024 bytes of the zip file:

GET .../documents/api/1.2/folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/11E666917053923171255718EFB36B481614961716028/package

Request Header

Range: bytes=0-1023

Request Body

None.

HTTP Status Code

HTTP_STATUS = 206

Example 3

The following example attempts to download a zip owned by a different user. The error returned is not very detailed to prevent data exposure:

GET .../documents/api/1.2/folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/11E666917053923171255718EFB36B481614961716028/package

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 400

JSON Response

{
    "errorCode": "-96",
    "errorKey": "!csBulkdownloadUnableToGetStatusJob",
    "errorMessage": "There is no bulkdownload job for the specified job Id.",
    "errorType": "folder",
    "title": "There is no bulkdownload job for the specified job Id.",
    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Back to Top