client.jobs.list_runs
A method of the Jobs endpoint.
- list_runs(id: int, *, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse
List runs for the given job
API URL:
GET /jobs/{id}/runsimport civis client = civis.APIClient() response = client.jobs.list_runs(...)
- Parameters:
- idint
The ID for this job.
- limitint, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- 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 id. Must be one of: id.
- 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.PaginatedResponseid : 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.