client.search.list

A method of the Search endpoint.

list(*, query: str = None, type: str = None, offset: int = None, order: str = None, owner: str = None, limit: int = None, archived: str = None, last_run_state: str = None) ListResponse

Perform a search

API URL: GET /search

import civis
client = civis.APIClient()
response = client.search.list(...)
Parameters:
querystr, optional

The search query.

typestr, optional

The type for the search. It accepts a comma-separated list. Valid arguments are listed on the “GET /search/types” endpoint.

offsetint, optional

The offset for the search results.

orderstr, optional

The field on which to order the result set.

ownerstr, optional

The owner for the search.

limitint, optional

Defaults to 10. Maximum allowed is 1000.

archivedstr, optional

If specified, return only results with the chosen archived status; either ‘true’, ‘false’, or ‘all’. Defaults to ‘false’.

last_run_statestr, optional

The last run state of the job being searched for; either: ‘queued’, ‘running’, ‘succeeded’, ‘failed’, or ‘cancelled’.

Returns:
civis.ListResponse
  • total_resultsint

    The number of items matching the search query.

  • aggregationscivis.Response

    Aggregations by owner and type for the search results.

  • resultsList[civis.Response]

    The items returned by the search.

    • scorefloat (float)

      The relevance score from the search request.

    • typestr

      The type of the item.

    • idint

      The ID of the item.

    • namestr

      The name of the item.

    • type_namestr

      The verbose name of the type.

    • updated_atstr (time)

      The time the item was last updated.

    • ownerstr

      The owner of the item.

    • use_countint

      The use count of the item, if the item is a template.

    • last_run_idint

      The last run id of the item, if the item is a job.

    • last_run_statestr

      The last run state of the item, if the item is a job.

    • last_run_startstr (time)

      The last run start time of the item, if the item is a job.

    • last_run_finishstr (time)

      The last run finish time of the item, if the item is a job.

    • publicbool

      The flag that indicates a template is available to all users.

    • last_run_exceptionstr

      The exception of the item after the last run, if the item is a job.

    • auto_sharebool

      The flag that indicates if a project has Auto-Share enabled.