---
title: "List function invocations"
method: GET
path: "/functions/{function_id}/invocations"
tags: ["Functions"]
---

# List function invocations

`GET /functions/{function_id}/invocations`

Retrieve recent invocation history for a function, including console logs captured during execution.

Returns the most recent invocations (up to 20 by default) with:
- Request/response payloads
- Status codes and execution duration
- Console logs (info, warn, error messages)
- Error details for failed invocations

Use the `status` parameter to filter by success or failure.

## Query parameters

- `status` 'success' | 'failed'
- `limit` integer

## Response `200`

Invocations retrieved successfully

- FunctionInvocationsResponse — Function invocations with console logs
  - `data` object, required
    - `function_id` string, uuid, required — Function identifier
    - `function_name` string, required — Function display name
    - `invocations` FunctionInvocationDetail[], required
      - `id` string, uuid, required — Invocation identifier
      - `status_code` integer, required — HTTP status code returned by the function
      - `duration_ms` integer, nullable — Execution duration in milliseconds
      - `request_body` object, nullable — Request payload sent to the function
      - `response_body` object, nullable — Response returned by the function
      - `error_message` string, nullable — Error message if invocation failed
      - `created_at` string, date-time, required — Invocation timestamp
      - `console_logs` FunctionConsoleLog[] — Console logs captured during execution
        - `level` string, required — Log level (info, warn, error, debug)
        - `message` string, required — Log message content
        - `logged_at` string, date-time, required — Timestamp when the log was recorded
        - `stack` string, nullable — Stack trace (if error)
    - `total` integer, required — Number of invocations returned

## Other responses

- `401` — Missing or invalid API key
- `404` — Resource not found

---

[API](https://skmtc.net/kapso/apis/kapso-platform-api.md) · [All operations](https://skmtc.net/kapso/apis/kapso-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kapso/kapso-platform-api/versions/18ff5548a33f/schema)
