---
title: "List Function Runs By Function Id"
method: GET
path: "/functions/{function_id}/runs"
tags: ["functions"]
---

# List Function Runs By Function Id

`GET /functions/{function_id}/runs`

## Path parameters

- `function_id` string, nullable, required

## Query parameters

- `page` integer — Page number
- `page_size` integer — Number of items per page
- `only_active` boolean — Whether to only return active sessions
- `only_current_token` boolean — Whether to only return sessions for the current token (apikey)
- `include_system` boolean — Whether to include internal system sessions

## Headers

- `x-notte-request-origin` string, nullable
- `x-notte-sdk-version` string, nullable

## Response `200`

Successful Response

- PaginatedResponseGetFunctionRunResponse
  - `items` GetFunctionRunResponse[], required
    - `function_id` string, required — The ID of the function
    - `function_run_id` string, required — The ID of the function run
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `status` 'closed' | 'active' | 'failed', required
    - `session_id` string, nullable — The ID of the session
    - `logs` string[] — The logs of the workflow run
    - `variables` object, nullable — The variables of the workflow run
    - `result` string, nullable — The result of the workflow run (if any)
    - `local` boolean — Whether the workflow has been run locally or on the cloud
    - `workflow_id` string, required
    - `workflow_run_id` string, required
  - `page` integer, required
  - `page_size` integer, required
  - `has_next` boolean, required
  - `has_previous` boolean, required

## Other responses

- `422` — Validation Error

---

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