Skip to content
Print Report

Create Report Export Task

Creates an asynchronous export task for a given report. The file produced by the task can be viewed and downloaded from the export records.

Request parameters

  • Required: report_id (report ID), file_type (export file type), operator (operator), columns (columns to export), porter_params (query condition parameters).
  • Optional: paper (paper size).
  • See the field descriptions for each parameter's format, allowed values, default behavior, and business meaning.

Business notes

The exported content is determined jointly by columns (the report's currently sorted/displayed columns) and porter_params (the report's current query conditions), so the export matches the report data the caller sees. The values allowed for file_type may vary by report.

Result

On success, an export task is created and the file is generated asynchronously. See the 200 response definition for the returned content.

POSThttps://b-api.lbkrs.com/report/export_task/new

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Permission

lb_hk_report.report_printing

The Broker ACCESS_TOKEN must be granted the permission above, or the call will be rejected.

Request body application/json

report_idstringrequired

The current report page's route parameter report_id.

file_typestringrequired

Report export file type, single-select; the available types may vary by report.

Values
pdf
PDF
csv
CSV
excel
Excel
operatorstringrequired

Identifier of the operator initiating this request, used for audit tracing. This field is required.

columnsarray<string>required

The list of dataporter_index values for the report's currently sorted/displayed columns.

porter_paramsobjectrequired

The query conditions of the current report list (with the pagination fields page/page_size removed); the field structure varies by report template.

paperstring

Paper size, provided for some reports.

Responses

HTTP 200The request was processed successfully. The response data does not contain additional business fields.
Standard response envelopecodemessagedata
dataobjectdata structure
task_idstring
HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs