> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/assistant/custom-functions/spark_callhistory.md).

# SPARK\_CALLHISTORY

{% hint style="info" %}
This function is only available in Coherent Assistant and not implemented into [Neuron](/build-spark-services/neuron.md). Spark services created with this UDF will not include this functionality.
{% endhint %}

Syntax: `CS.SPARK_CALLHISTORY(call_id, [index], [show_metadata], [show_inputs], [show_outputs], [show_errors], [show_warnings])`

Returns information about an API call from the [API Call History](/navigation/api-call-history.md).

| Parameter       | Description                                                                                                            |
| --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `call_id` \*    | [Execute API](/spark-apis/execute-api.md) `call_id`.                                                                   |
| `index`         | For [Execute API (v4)](/spark-apis/execute-api/execute-api-v4.md) calls, the zero-based index of the call to retrieve. |
| `show_metadata` | Boolean to include API reponse metadata. Default `false`.                                                              |
| `show_inputs`   | Boolean to include API request inputs. Default `true`.                                                                 |
| `show_outputs`  | Boolean to include API response outputs. Default `true`.                                                               |
| `show_errors`   | Boolean to include API response errors. Default `true`.                                                                |
| `show_warnings` | Boolean to include API response warnings. Default `false`.                                                             |

## Output

The function returns a dynamic spill range consisting of at least three columns:

| Column         | Description                                                                          |
| -------------- | ------------------------------------------------------------------------------------ |
| `1`            | Data type of the data object: `inputs`, `outputs`, `errors`, `warnings`, `metadata`. |
| `2`            | Name of the data object.                                                             |
| `3`, `4`, etc. | Value of the object.                                                                 |
