DocsReferenceBulkAPI

Reference

BulkAPI

Data movement: synchronous import and export, batched import for large files, and asynchronous (job-based) import and export. 16 methods.

php
$org       = $ac->getOrgInstance($org_id);
$workspace = $ac->getWorkspaceInstance($org_id, $workspace_id);
$view      = $ac->getViewInstance($org_id, $workspace_id, $view_id);
$bulk      = $ac->getBulkInstance($org_id, $workspace_id);

BulkAPI exposes 16 methods. Method names are camelCase and identifiers are string.

Methods#

exportBulkData, exportBulkDataStream, exportData, exportDataStream, getExportJobDetails, getImportJobDetails, importBulkData, importBulkDataAsBatches, importBulkDataInNewTable, importBulkDataInNewTableAsBatches, importData, importDataInNewTable, importRawData, importRawDataInNewTable, initiateBulkExport, initiateBulkExportUsingSQL

exportBulkData#

php
exportBulkData($job_id, $file_path)

Download the exported data for the mentioned job id.

ParameterTypeDescription
job_idstringId of the job.
file_pathstringPath of the file where the data exported to be stored.
configarray()Contains any additional control parameters. Can be null.

Raises — IOException; ServerException; ParseException

exportBulkDataStream#

php
exportBulkDataStream($job_id)

Download exported bulk data for the specified job id as a stream.

ParameterTypeDescription
job_idstringId of the export job.

Returns — PHP stream object containing the exported data.

Raises — ServerException; ParseException

exportData#

php
exportData($view_id, $response_format, $file_path, $config = array()

Export the mentioned table (or) view data.

ParameterTypeDescription
view_idstringId of the view to be exported.
response_formatstringThe format in which the data is to be exported.
file_pathstringPath of the file where the data exported to be stored.
configarray()Contains any additional control parameters. Can be null.

Raises — IOException; ServerException; ParseException

exportDataStream#

php
exportDataStream($view_id, $response_format, $config = array()

Export the specified view data as a stream.

ParameterTypeDescription
view_idstringId of the view to be exported.
response_formatstringFormat in which the data is to be exported.
configarrayOptional configuration parameters.

Returns — PHP stream object containing the exported data.

Raises — ServerException; ParseException

getExportJobDetails#

php
getExportJobDetails($job_id)

Returns the details of the export job.

ParameterTypeDescription
job_idstringId of the job.

Returns — Export job details.

Raises — IOException; ServerException; ParseException

getImportJobDetails#

php
getImportJobDetails($job_id)

Returns the details of the import job.

ParameterTypeDescription
job_idstringId of the job.

Returns — Import job details.

Raises — IOException; ServerException; ParseException

importBulkData#

php
importBulkData($view_id, $import_type, $file_type, $auto_identify, $file_path, $config = array()

Asynchronously import the data contained in the mentioned file into the table.

ParameterTypeDescription
view_idstringId of the view where the data to be imported.
import_typestringThe type of import. Can be one of - append, truncateadd, updateadd.
file_typestringType of the file to be imported.
auto_identifystringUsed to specify whether to auto identify the CSV format.
file_pathstringPath of the file to be imported.
configarray()Contains any additional control parameters. Can be null.

Returns — Import job id.

Raises — IOException; ServerException; ParseException

importBulkDataAsBatches#

php
importBulkDataAsBatches($view_id, $import_type, $auto_identify, $file_path, $batch_size, $config = array()

Asynchronously import the data contained in the mentioned file into the table.

ParameterTypeDescription
view_idstringId of the view where the data to be imported.
import_typestringThe type of import. Can be one of - append, truncateadd, updateadd.
auto_identifystringUsed to specify whether to auto identify the CSV format.
file_pathstringPath of the file to be imported.
batch_sizeintNumber of lines per batch.
configarray()Contains any additional control parameters. Can be null.

Returns — Import job id.

Raises — IOException; ServerException; ParseException

importBulkDataInNewTable#

php
importBulkDataInNewTable($table_name, $file_type, $auto_identify, $file_path, $config = array()

Asynchronously create a new table and import the data contained in the mentioned file into the created table.

ParameterTypeDescription
table_namestringName of the new table to be created.
file_typestringType of the file to be imported.
auto_identifystringUsed to specify whether to auto identify the CSV format.
file_pathstringPath of the file to be imported.
configarray()Contains any additional control parameters. Can be null.

Returns — Import job id.

Raises — IOException; ServerException; ParseException

importBulkDataInNewTableAsBatches#

php
importBulkDataInNewTableAsBatches($table_name, $auto_identify, $file_path, $batch_size, $config = array()

Asynchronously create a new table and import the data contained in the mentioned file into the created table.

ParameterTypeDescription
table_namestringName of the new table to be created.
auto_identifystringUsed to specify whether to auto identify the CSV format.
file_pathstringPath of the file to be imported.
batch_sizeintNumber of lines per batch.
configarray()Contains any additional control parameters. Can be null.

Returns — Import job id.

Raises — IOException; ServerException; ParseException

importData#

php
importData($view_id, $import_type, $file_type, $auto_identify, $file_path, $config = array()

Import the data contained in the mentioned file into the table.

ParameterTypeDescription
view_idstringId of the view where the data to be imported.
import_typestringThe type of import. Can be one of - append, truncateadd, updateadd.
file_typestringType of the file to be imported.
auto_identifystringUsed to specify whether to auto identify the CSV format.
file_pathstringPath of the file to be imported.
configarray()Contains any additional control parameters. Can be null.

Returns — Import result.

Raises — IOException; ServerException; ParseException

importDataInNewTable#

php
importDataInNewTable($table_name, $file_type, $auto_identify, $file_path, $config = array()

Create a new table and import the data contained in the mentioned file into the created table.

ParameterTypeDescription
table_namestringName of the new table to be created.
file_typestringType of the file to be imported.
auto_identifystringUsed to specify whether to auto identify the CSV format.
file_pathstringPath of the file to be imported.
configarray()Contains any additional control parameters. Can be null.

Returns — Import result.

Raises — IOException; ServerException; ParseException

importRawData#

php
importRawData($view_id, $import_type, $file_type, $auto_identify, $data, $config = array()

Import the data contained in the mentioned file into the table.

ParameterTypeDescription
view_idstringId of the view where the data to be imported.
import_typestringThe type of import. Can be one of - append, truncateadd, updateadd.
file_typestringType of the file to be imported.
auto_identifystringUsed to specify whether to auto identify the CSV format.
datastringRaw data to be imported.
configarray()Contains any additional control parameters. Can be null.

Returns — Import result.

Raises — IOException; ServerException; ParseException

importRawDataInNewTable#

php
importRawDataInNewTable($table_name, $file_type, $auto_identify, $data, $config = array()

Create a new table and import the raw data provided into the created table.

ParameterTypeDescription
table_namestringName of the new table to be created.
file_typestringType of the file to be imported.
auto_identifystringUsed to specify whether to auto identify the CSV format.
datastringRaw data to be imported.
configarray()Contains any additional control parameters. Can be null.

Returns — Import result.

Raises — IOException; ServerException; ParseException

initiateBulkExport#

php
initiateBulkExport($view_id, $response_format, $config = array()

Initiate asynchronous export for the mentioned table (or) view data.

ParameterTypeDescription
view_idstringId of the view to be exported.
response_formatstringThe format in which the data is to be exported.
configarray()Contains any additional control parameters. Can be null.

Returns — Export job id.

Raises — IOException; ServerException; ParseException

initiateBulkExportUsingSQL#

php
initiateBulkExportUsingSQL($sql_query, $response_format, $config = array()

Initiate asynchronous export with the given SQL Query.

ParameterTypeDescription
sql_querystringThe SQL Query whose output is exported.
response_formatstringThe format in which the data is to be exported.
configarray()Contains any additional control parameters. Can be null.

Returns — Export job id.

Raises — IOException; ServerException; ParseException

  • Errors — the failure envelope and codes worth branching on.
  • Limits — throttles and quotas that apply to these calls.
Zoho Analytics PHP SDK · REST API v2 Generated 2026-10-27