Get Status of a Bulk Download Job

get

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

Returns the status of a bulk download job.

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.

Back to Top

Response

Supported Media Types

200 Response

The request was fulfilled.

Body ()
Root Schema : FolderStatusBulkZipResponse
Type: object
The response body includes information about the bulk zip job.
Show Source
Nested Schema : BulkZipFileDetails
Type: object
Information about the zip file.
Show Source
Nested Schema : BulkZipItemsDetails
Type: object
Optional array of files globally unique identifiers that are not copied to the zip file.
Show Source
Nested Schema : BulkZipLinkDetails
Type: object
Links for a completed job.
Show Source
Example Response (application/json)
{
    "completed":true,
    "completedPercentage":100,
    "details":{
        "filename":"OCE-20210303.zip",
        "filesize":27811
    },
    "errorCode":0,
    "links":{
        "href":"OCEHost/documents/api/1.2/folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/43C4798AB49E496B53A27D99F3CE768F1614800841210/package",
        "rel":"enclosure",
        "method":"GET",
        "mediaType":"application/zip"
    },
    "progress":"SUCCEEDED",
    "type":"folder"
}

400 Response

The request is invalid as described by the error returned.

403 Response

Forbidden if the user does not have read permission.

Back to Top

Examples

The following example requests the status on a completed job.

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
    "completed": "true",
    "completedPercentage": "100",
    "details": {
        "filename": "OCE-20210305.zip",
        "filesize": "774987"
    },
    "errorCode": "0",
    "links": [
        {
            "href": "[OCEHost]/documents/api/1.2/folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/11E666917053923171255718EFB36B481614961716028/package",
            "rel": "enclosure",
            "method": "GET",
            "mediaType": "application/zip"
        }
    ],
    "progress": "SUCCEEDED",
    "type": "folder"
}

Example 2

The following example requests the status on a completed job, but several files are not copied to the zip:

GET .../folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/945B2A631ED396410B04ADC5E814EC8B1614898571312

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
    "completed": "true",
    "completedPercentage": "100",
    "details": {
        "filename": "OCE-20210304.zip",
        "filesize": "8024"
    },
    "errorCode": "0",
    "items": [
        {
            "id": "DC034C1C970D99900684230D1480C189B284D1C79D21",
            "error": "Item not available."
        },
        {
            "id": "D4B22A83BED696112AC9748463A9AA0BDDE61F516AC1",
            "error": "Item not available."
        }
    ],
    "links": [
        {
            "href": "[OCEHost]/documents/api/1.2/folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/945B2A631ED396410B04ADC5E814EC8B1614898571312/package",
            "rel": "enclosure",
            "method": "GET",
            "mediaType": "application/zip"
        }
    ],
    "progress": "SUCCEEDED",
    "type": "folder"
}

Example 3

The following example requests the status on a in-process job:

GET .../folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/BF18AE4AC6F86C9247AD2E2CED0092021614899361960

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
    "completed": "false",
    "completedPercentage": "45",
    "details": {
        "filename": "OCE-20210304.zip",
        "filesize": "0"
    },
    "errorCode": "0",
    "progress": "PROCESSING",
    "type": "folder"
}

Example 4

The following example requests the status on a job owned by a different user. The error returned is not very detailed to prevent data exposure:

GET .../folders/FE7DA518D17AA5E46E282D9A1B02AE3398E71823807D/_download/BF18AE4AC6F86C9247AD2E2CED0092021614899361960

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