Get the Status of the Bulk Read Job
Table of Contents
Purpose
To get the details of a bulk read job performed previously.
Request Details
Request URL
https://<base_url>/creator/v2.1/bulk/<account_owner_name>/<app_link_name>/report/<report_link_name>/read/<job_id>
Header
Key | Value | Description |
Authorization | Zoho-oauthtoken 1000.8cb99dxxxxx xxxxxxxx9be93.9b8 xxxxxxxxxxxxxxxf | An authentication token (authtoken) allows users to access apps and APIs without having to enter their login credentials each time. |
Scope
scope=ZohoCreator.bulk.READ
where,
base_url | the base URL of your Creator account For example, it's www.zohoapis.com if your account belongs to Zoho's US DC, and is www.zohoapis.eu if it belongs to Zoho's EU DC. |
account_owner_name | the username of the Creator account's owner |
app_link_name | the link name of the target application |
report_link_name | the link name of the target report |
read | name of the operation performed |
job_id | unique ID of the bulk read job. |
Request method
GET
Response Structure
- operationstring
Specifies the type of action the API completed. Sample - "operation": "read"
- created_bystring
Specifies the name of the user who initiated the bulk read job. Sample - "created_by": "jason18",
- created_timestring
Specifies the time period of when the bulk read job was initialized.
- statusstring
Specifies the current status of the bulk read job. Example: "status": "IN PROGRESS" , "COMPLETED" , "FAILED".
- idstring
Specifies the unique identifier of the bulk read job. Sample - "id": "1000010760002".
- resultJSON Object
Available only after the completion of the job. Please refer to the below section for information on the "result" JSON object.
"result" Properties
- countInteger
Specifies the actual number of records exported. Sample - "count": 14567
- download_urlstring
Specifies the URL that contains the CSV file. User can send a GET request with your api domain attached to the download URL to download the file. Sample - "/api/bulk/v2.1/jason18/zylker-store/report/All_Orders/read/2000000010003/result/"
- record_cursorstring
Token will be valid for a period of 15mins. Request for further fetch of request with this particular cursor should reach the server within 15mins.
Note
- When you’re fetching batches of records and have reached the last batch, the record_cursor will not be received in the last batch. For example, if you are fetching five hundred thousand records in two batches of two hundred thousand records and one batch of one hundred thousand records (last batch), the record_cursor will not be received in the last batch of one hundred thousand records.
- To learn about the Bulk Read API limits, refer to this page.
Sample Request
Copiedcurl "https://www.zohoapis.com/creator/v2.1/bulk/jason18/zylker-store/report/All_Orders/read/{0}"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Copiedresponse = invokeUrl
[
url: "https://www.zohoapis.com/creator/v2.1/bulk/jason18/zylker-store/report/All_Orders/read/137836000000335003"
type: GET
connection: "zoho-creator"
];
info response ;
Copiedpackage main.java.org.example;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import org.json.JSONException;
import org.json.JSONObject;
public class BulkReadStatus
{
public static void main(String[] args) throws JSONException
{
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://www.zohoapis.com/creator/v2.1/bulk/jason18/zylker-store/report/All_Orders/read/137836000000335003").newBuilder();
Request request = new Request.Builder()
.url(urlBuilder.toString())
.method("GET", null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf")
.build();
try
{
JSONObject response = new JSONObject(client.newCall(request).execute().body().string());
}
catch (Exception e)
{
System.out.println("Exception while making the API request.");
}
}
}
Copiedlet api_headers = {
"Authorization": "Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
}
try {
let response = fetch("https://www.zohoapis.com/creator/v2.1/bulk/jason18/zylker-store/report/All_Orders/read/137836000000335003", {
method: "GET",
headers: api_headers
})
}
catch (exception) {
console.error(exception)
}
Copiedimport requests
api_headers = {
"Authorization": "Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
}
try:
response = requests.get("https://www.zohoapis.com/creator/v2.1/bulk/jason18/zylker-store/report/All_Orders/read/137836000000335003", headers=api_headers)
except:
print("Exception while making the API request.")
Sample Response:
Copied{
"code": 3000,
"details": {
"created_time": "06-Sep-2021 16:47:18",
"id": "2000000018003",
"operation": "read",
"created_by": "jason18",
"status": "In-progress"
}
}
Sample response of job completed
Copied{
"code": 3000,
"details": {
"result": {
"count": 16,
"download_url": "/api/bulk/v2.1/jason_18/one/report/b_Report/read/2000000010003/result"
},
"created_time": "06-Sep-2021 16:47:18",
"id": "2000000010003",
"operation": "read",
"created_by": "jason_18",
"status": "Completed"
}
}