client.imports.list_batches

A method of the Imports endpoint.

list_batches(*, hidden: bool = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse

List batch imports

API URL: GET /imports/batches

import civis
client = civis.APIClient()
response = client.imports.list_batches(...)
Parameters:
hiddenbool, optional

If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.

limitint, optional

Number of results to return. Defaults to 20. Maximum allowed is 50.

page_numint, optional

Page number of the results to return. Defaults to the first page, 1.

orderstr, optional

The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, created_at.

order_dirstr, optional

Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.

iteratorbool, optional

If True, return a generator (specifically, a civis.PaginatedResponse object) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return a civis.ListResponse object (= a list of civis.Response objects), whose size is determined by ‘limit’. Defaults to False.

Returns:
civis.ListResponse | civis.PaginatedResponse
  • idint

    The ID for the import.

  • schemastr

    The destination schema name. This schema must already exist in Redshift.

  • tablestr

    The destination table name, without the schema prefix. This table must already exist in Redshift.

  • remote_host_idint

    The ID of the destination database host.

  • statestr

    The state of the run; one of “queued”, “running”, “succeeded”, “failed”, or “cancelled”.

  • started_atstr (time)

    The time the last run started at.

  • finished_atstr (time)

    The time the last run completed.

  • errorstr

    The error returned by the run, if any.