ListImportJobs()
Lists bulk-import jobs visible to the target deployment.
pub async fn list_import_jobs(&self, request: ListImportJobsRequest) -> Result<BulkImportResponse>
Request Syntax
let request = ListImportJobsRequest::builder()
.collection_name("books")
.page_size(10)
.current_page(1)
.build()?;
REQUEST FIELDS:
database_name: StringName of the database that holds the collection.
collection_name: StringName of the collection to filter jobs by.
cluster_id: StringCluster ID for Zilliz Cloud deployments. Cannot be combined with
project_idandregion_id.project_id: StringProject ID for Zilliz Cloud deployments. Must be specified together with
region_id.region_id: StringRegion ID for Zilliz Cloud deployments. Must be specified together with
project_id.page_size: u32Number of jobs per page. Must be greater than zero. Defaults to
10.current_page: u32Page number to return, starting from
1. Must be greater than zero. Defaults to1.
RETURN TYPE:
Result
RETURNS:
A BulkImportResponse containing the bulk-import endpoint response. Returns an Error if the operation fails.
BulkImportResponse
code() // -> i64
message() // -> &str
data() // -> &Value
get_data_field() // -> Option<&Value>
job_id() // -> Option<&str>
state() // -> Option<&str>
progress() // -> Option<i64>
reason() // -> Option<&str>
METHODS:
code()(i64) -The response status code.
message()(&str) -The response message.
data()(&Value) -The raw response data payload.
get_data_field()(Option<&Value>) -A named field from the response data, when present.
job_id()(Option<&str>) -The job ID reported by the endpoint, when present.
state()(Option<&str>) -The job state reported by the endpoint, when present.
progress()(Option) - The job progress reported by the endpoint, when present.
reason()(Option<&str>) -The failure reason reported by the endpoint, when present.
Example
let request = ListImportJobsRequest::builder()
.collection_name("books")
.build()?;
let resp = bulk.list_import_jobs(request).await?;