Loading...

Check Bulk Write Status

Description

You can execute this API to manually check the status of the bulk write job that you initiated previously.

If you had not configured a callback URL in your JSON request, you must check the job status yourself by executing this API. You must use the job_id that is sent to you in the automatic in-progress response when you initiated the bulk write operation, to check the job status subsequently.

Request Details

Request URL

GET

{api-domain}/baas/v1/project/{project_id}/bulk/write/{job_id}

copy

api-domain
URL
The DC-specific domain to access Catalyst API

project_id
Numerical
The unique ID of the project

job_id
Numerical

The unique ID of the job that was sent in the initial [in-progress status response](/en/api/introduction/overview-and-prerequisites/#response-details) after the Bulk Write API was executed


Request Headers

Authorization: Zoho-oauthtoken {oauth_token}

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.tables.bulk.CREATE

Response Details

The JSON response for the success state will contain the details of the executed job, along with a download URL, where you can download a CSV report file that will contain the details of the job execution. It will list all the records that were skipped from being written along with the reasons.

The JSON response for the failed state will contain the details of the executed job, along with a description of the error that occurred in the job processing, and its details.

Sample Request
copy

curl -X GET
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/bulk/write/2000000110044
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”

Sample Response: Job in Progress
copy
{
    "status": "success",
    "data": {
        "job_id": 2000000110044,
        "status": "In-Progress",
        "operation": "insert",
        "project_details": {
            "project_name": "EmployeeDatabase",
            "id": 4000000006007
        }
        "query": [
            {
                "table_id": 3376000000165511,
                "details": {
                    "object_url" : "https://zylker-emp-development.zohostratus.com/employees/emp_rec.csv",
            }
        }
    ],
    "callback": {
        "url": "https://hr.zylker.com/en/EmpRecords/_callback.php",
        "headers": {
            "src": "ZCatalyst",
            "operation": "bulkwriteAPI"
        },
        "params": {
            "project_name": "EmployeeDatabase"
        }
    },
    "created_by": {
            "zuid": 3000000006111,
            "is_confirmed": true,
            "email_id": "emma@zylker.com",
            "first_name": "Amelia",
            "last_name": "Burrows",
            "user_id": 671930409
    },
    "created_time": "Oct 05, 2020 07:33 PM"
}

}

View more

Sample Response: Job Successful
copy
{
    "status": "success",
    "data": {
        "job_id": 2000000110044,
        "status": "Completed",
        "operation": "insert",
        "project_details": {
            "project_name": "EmployeeDatabase",
            "id": 4000000006007
        }
        "query": [
            {
                "table_id": 3376000000165511,
                "details": {
                    "object_url" : "https://zylker-emp-development.zohostratus.com/employees/emp_rec.csv"
                }
            }
        ],
        "callback": {
            "url": "https://hr.zylker.com/en/EmpRecords/_callback.php",
            "headers": {
                "src": "ZCatalyst",
                "operation": "bulkwriteAPI"
            },
            "params": {
                "project_name": "EmployeeDatabase"
            }
        },
        "created_by": {
            "zuid": 3000000006111,
            "is_confirmed": true,
            "email_id": "emma@zylker.com",
            "first_name": "Amelia",
            "last_name": "Burrows",
            "user_id": 671930409
        },
        "created_time": "Oct 05, 2020 07:25 PM",
        "results": {
            "download_url": "https://api.catalyst.zoho.com/baas/v1/bulk/write/2000000110013/download",
            "description": "Bulk WRITE job completed. ",
            "details": [
                {
                    "table_id": 3376000000165511,
                    "records_processed": 176
                }
            ]
        }
    }
}
View more
Sample Response: Job Failed
copy
{
    "status": "success",
    "data": {
        "job_id": 2000000110044,
        "status": "Failed",
        "operation": "insert",
        "project_details": {
            "project_name": "EmployeeDatabase",
            "id": 4000000006007
        }
        "query": [
            {
                "table_id": 3376000000165511,
                "details": {
                    "object_url" : "https://zylker-emp-development.zohostratus.com/employees/emp_rec.csv"
                }
            }
        ],
        "callback": {
            "url": "https://hr.zylker.com/en/EmpRecords/_callback.php",
            "headers": {
                "src": "ZCatalyst",
                "operation": "bulkwriteAPI"
            },
            "params": {
                "project_name": "EmployeeDatabase"
            }
        },
        "created_by": {
            "zuid": 3000000006111,
            "is_confirmed": true,
            "email_id": "emma@zylker.com",
            "first_name": "Amelia",
            "last_name": "Burrows",
            "user_id": 671930409
        },
        "created_time": "Oct 05, 2020 07:25 PM",
        "results": {
            "description": "The reference_column 'DeptID' in fk_mapping of table 3376000000165511 is not a unique column",
            "details": [ ]
        }
    }
}
View more