Get the Status of the Bulk Read Job

Purpose

To get the details of a bulk read job performed previously.

Request Details

Request URL

https://www.zohoapis.com/bigin/bulk/v1/read/{job_id}
where job_id is the unique ID of the bulk read job.

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoBigin.bulk.read
(or)
scope=ZohoBigin.modules.{module_name}.{operation_type}

Possible module names

companies, contacts, deals, tasks, events, calls, products and activities.

Possible operation types

Full access to related records
READ - Get bulk read job

Sample Request

Copiedcurl "https://www.zohoapis.com/bigin/bulk/v1/read/3652397000000646004"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
CopiedZBiginBulkRead readIns= ZBiginRestClient.GetInstance().GetBulkReadInstance(3477061000002); // To get the ZBiginBulkRead instance using job_id
APIResponse response = readIns.GetBulkReadJobDetails();
ZBiginBulkRead bulkReadIns = (ZBiginBulkRead)response.Data;// To get ZBiginBulkRead instance

Sample Response: For Job Added

Copied{
    "data": [
        {
            "id": "3652397000000646004",
            "operation": "read",
            "state": "ADDED",
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Account_Name.Account_Name",
                    "Account_Name.Phone",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Boyle"
                        },
                        {
                            "api_name": "Account_Name.Phone",
                            "comparator": "contains",
                            "value": "5"
                        }
                    ],
                    "group_operator": "or"
                },
                "page": 1
            },
            "created_by": {
                "id": "3652397000000186017",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-04-01T14:20:04+05:30"
        }
    ]
}
CopiedZBiginBulkRead readIns= ZBiginRestClient.GetInstance().GetBulkReadInstance(3477061000002); // To get the ZBiginBulkRead instance using job_id
APIResponse response = readIns.GetBulkReadJobDetails();
ZBiginBulkRead bulkReadIns = (ZBiginBulkRead)response.Data;// To get ZBiginBulkRead instance

Sample Response: For Job In Progress

Copied{
    "data": [
        {
            "id": "3652397000000646004",
            "operation": "read",
            "state": "IN PROGRESS",
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Account_Name.Account_Name",
                    "Account_Name.Phone",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Boyle"
                        },
                        {
                            "api_name": "Account_Name.Phone",
                            "comparator": "contains",
                            "value": "5"
                        }
                    ],
                    "group_operator": "or"
                },
                "page": 1
            },
            "created_by": {
                "id": "3652397000000186017",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-04-01T14:22:04+05:30"
        }
    ]
}
CopiedZBiginBulkRead readIns= ZBiginRestClient.GetInstance().GetBulkReadInstance(3477061000002); // To get the ZBiginBulkRead instance using job_id
APIResponse response = readIns.GetBulkReadJobDetails();
ZBiginBulkRead bulkReadIns = (ZBiginBulkRead)response.Data;// To get ZBiginBulkRead instance

Sample Response: For Job Completed

Copied{
    "data": [
        {
            "id": "3652397000000646004",
            "operation": "read",
            "state": "COMPLETED",
            "result": {
                "page": 1,
                "count": 20,
                "download_url": "/bigin/bulk/v1/read/3652397000000646004/result",
                "per_page": 200000,
                "more_records": false
            },
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Account_Name.Account_Name",
                    "Account_Name.Phone",
                    "Lead_Source",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Lead_Source",
                            "comparator": "equal",
                            "value": "Advertisement"
                        },
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Boyle"
                        },
                        {
                            "api_name": "Account_Name.Phone",
                            "comparator": "contains",
                            "value": "5"
                        }
                    ],
                    "group_operator": "or"
                },
                "page": 1
            },
            "created_by": {
                "id": "3652397000000186017",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-04-01T14:24:04+05:30"
        }
    ]
}
CopiedZBiginBulkRead readIns= ZBiginRestClient.GetInstance().GetBulkReadInstance(3477061000002); // To get the ZBiginBulkRead instance using job_id
APIResponse response = readIns.GetBulkReadJobDetails();
ZBiginBulkRead bulkReadIns = (ZBiginBulkRead)response.Data;// To get ZBiginBulkRead instance

Response Structure

  • operationstring

    Specifies the type of action the API completed. Sample - "operation" : "read”.

  • created_byJSON Object

    Specifies the ID and Name of the user who initiated the bulk read job. Sample - "created_by": { "id": "1000000031045", "name": "Patricia Boyle" },

  • created_timeISO8601

    Specifies the time period of when the bulk read job was initialized.

  • statestring

    Specifies the current status of the bulk read job. Example: "state": "ADDED" or "IN PROGRESS" or "COMPLETED".

  • queryJSON Object

    Specifies the "query" provided by the user when creating the bulk read job. The attributes are the same as in the Request JSON, with "modules", "cvid", fields", "criteria" and "page".

  • idString

    Specifies the unique identifier of the bulk read job. Sample - "id": "1000010760002".

  • resultJSON Object

    It is available only after the completion of the job. Please refer to the below section for information on the "result" JSON object.

"result" Properties

  • pageInteger

    Describes the range of the number of records exported. If the "page" is one, then the number of records would be between 1 - 200,000. If it's "two", then the records from 200,001 - 400,000 will be taken for export.

  • countInteger

    Specifies the actual number of records exported. Sample - "count": 14567

  • download_urlString

    Specifies the url which contains the CSV file. User can send a GET request with your api domain attached to the download URL to download the file. Sample - "/bigin/bulk/v1/read/2883756000001275012/result".

  • more_recordsboolean

    The "more_records" key in the response can be used to detect if there are any further records. You can change the value of "page" key for additional export jobs.

Note

To know about the Bulk Read API limits, go here.

Sample Request: For the job with cvid and Criteria

Copiedcurl "https://www.zohoapis.com/bigin/bulk/v1/read/554023000000568002"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
CopiedZBiginBulkRead readIns= ZBiginRestClient.GetInstance().GetBulkReadInstance(3477061000002); // To get the ZBiginBulkRead instance using job_id
APIResponse response = readIns.GetBulkReadJobDetails();
ZBiginBulkRead bulkReadIns = (ZBiginBulkRead)response.Data;// To get ZBiginBulkRead instance

Sample Response: For Job Completed

Copied{
    "data": [
        {
            "id": "554023000000568002",
            "operation": "read",
            "state": "COMPLETED",
            "result": {
                "page": 1,
                "count": 3,
                "download_url": "/bigin/bulk/v1/read/554023000000568002/result",
                "per_page": 200000,
                "more_records": false
            },
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Email",
                    "Mobile",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Email",
                            "comparator": "contains",
                            "value": "boyle"
                        },
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Patricia Boyle"
                        }
                    ],
                    "group_operator": "and"
                },
                "page": 1,
                "cvid": "554023000000093005"
            },
            "created_by": {
                "id": "554023000000235011",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-05-09T14:01:24+05:30"
        }
    ]
}
CopiedZBiginBulkRead readIns= ZBiginRestClient.GetInstance().GetBulkReadInstance(3477061000002); // To get the ZBiginBulkRead instance using job_id
APIResponse response = readIns.GetBulkReadJobDetails();
ZBiginBulkRead bulkReadIns = (ZBiginBulkRead)response.Data;// To get ZBiginBulkRead instance