client.imports.list
A method of the Imports endpoint.
- list(*, type: str = None, destination: str = None, source: str = None, status: str = None, author: str = None, hidden: bool = None, archived: str = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse
List Imports
API URL:
GET /importsimport civis client = civis.APIClient() response = client.imports.list(...)
- Parameters:
- typestr, optional
If specified, return imports of these types. It accepts a comma-separated list, possible values are Dbsync, AutoImport, GdocImport, and GdocExport.
- destinationstr, optional
If specified, returns imports with one of these destinations. It accepts a comma-separated list of remote host ids.
- sourcestr, optional
If specified, returns imports with one of these sources. It accepts a comma-separated list of remote host ids. ‘Dbsync’ must be specified for ‘type’.
- statusstr, optional
If specified, returns imports with one of these statuses. It accepts a comma-separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.
- authorstr, optional
If specified, return items from any of these authors. It accepts a comma- separated list of user IDs.
- hiddenbool, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
- archivedstr, optional
The archival status of the items to return. One of: true, false, all. A blank value is read as ‘false’, which is also the default.
- 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, name, created_at, last_run.updated_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.PaginatedResponseobject) 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 acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.PaginatedResponse- idint
The ID for the import.
- namestr
The name of the import.
- source
civis.Response remote_host_id : int
credential_id : int
- additional_credentialsList[int]
Array that holds additional credentials used for DB Syncs. The first element is an SSL private key credential id, and the second element is the corresponding public key credential id.
name : str
- source
- destination
civis.Response remote_host_id : int
credential_id : int
- additional_credentialsList[int]
Array that holds additional credentials used for DB Syncs. The first element is an SSL private key credential id, and the second element is the corresponding public key credential id.
name : str
- destination
- sync_typestr
The type of sync to perform; one of Dbsync, AutoImport, GdocImport, and GdocExport.
is_outbound : bool
- job_typestr
The job type of this import.
state : str
created_at : str (date-time)
updated_at : str (date-time)
- last_run
civis.Response id : int
- statestr
The state of the run. One of queued, running, succeeded, failed or cancelled.
- created_atstr (time)
The time that the run was queued.
- started_atstr (time)
The time that the run started.
- finished_atstr (time)
The time that the run completed.
- errorstr
The error message for this run, if present.
- last_run
- user
civis.Response - idint
The ID of this user.
- namestr
This user’s name.
- usernamestr
This user’s username.
- initialsstr
This user’s initials.
- onlinebool
Whether this user is online.
- user
- schedule
civis.Response - scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- time_zonestr
The time zone of this import.
- archivedbool
The archival status of the requested item(s).