List function calls
- async AsyncCogniteClient.functions.calls.list(
- function_id: int | None = None,
- function_external_id: str | None = None,
- status: str | None = None,
- schedule_id: int | None = None,
- start_time: dict[str, int] | None = None,
- end_time: dict[str, int] | None = None,
- limit: int | None = 25,
List all calls associated with a specific function id.
Either function_id or function_external_id must be specified.
- Parameters:
function_id (int | None) – ID of the function on which the calls were made.
function_external_id (str | None) – External ID of the function on which the calls were made.
status (str | None) – Status of the call. Possible values [“Running”, “Failed”, “Completed”, “Timeout”].
schedule_id (int | None) – Schedule id from which the call belongs (if any).
start_time (dict[str, int] | None) – Start time of the call. Possible keys are min and max, with values given as time stamps in ms.
end_time (dict[str, int] | None) – End time of the call. Possible keys are min and max, with values given as time stamps in ms.
limit (int | None) – Maximum number of function calls to list. Pass in -1, float(‘inf’) or None to list all Function Calls.
- Returns:
List of function calls
- Return type:
Examples
List function calls:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> calls = client.functions.calls.list(function_id=1)
List function calls directly on a function object:
>>> func = client.functions.retrieve(id=1) >>> calls = func.list_calls()