Retrieve function call response

async AsyncCogniteClient.functions.calls.get_response(
call_id: int,
function_id: int | None = None,
function_external_id: str | None = None,
) dict[str, object] | None

Retrieve the response from a function call.

Parameters:
  • call_id (int) – ID of the call.

  • function_id (int | None) – ID of the function on which the call was made.

  • function_external_id (str | None) – External ID of the function on which the call was made.

Returns:

Response from the function call.

Return type:

dict[str, object] | None

Examples

Retrieve function call response by call ID:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> response = client.functions.calls.get_response(call_id=2, function_id=1)

Retrieve function call response directly on a call object:

>>> call = client.functions.calls.retrieve(call_id=2, function_id=1)
>>> response = call.get_response()