> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# List Function Runs By Function Id



## OpenAPI

````yaml https://api.notte.cc/openapi.json get /functions/{function_id}/runs
openapi: 3.1.0
info:
  title: Notte API
  description: >-
    Notte API is a REST API that allows you to interact with Notte. It is used
    to create cloud browser sessions, scrape webpages, and run web ai agents to
    act on your behalf on the internet.
  version: 1.4.40
  x-logo:
    url: https://www.notte.cc/images/logo/logo-white.png
servers: []
security: []
tags:
  - name: agents
    description: Web AI agents (start, stop, status, replay, etc.)
  - name: sessions
    description: Session management (start, stop, status, etc.)
  - name: debug
    description: Session debugging tools (replay,logs, recording, etc.)
  - name: page
    description: Page operations withing a session (observe, step, scrape, etc.)
  - name: storage
    description: File storage interface (upload, download, list, etc.)
  - name: network
    description: Network requests/responses withing a session (intercept, etc.)
  - name: vaults
    description: >-
      Vault & Credentials management (create/delete vaults, create/delete
      credentials, etc.)
  - name: personas
    description: Persona management (create, delete, list emails, list sms, etc.)
  - name: scrape
    description: >-
      Webpage scraping (scrape, screenshot, etc.) with automatic session
      management.
  - name: health
    description: Health check endpoint.
  - name: usage
    description: Usage logs (usage, logs, etc.)
  - name: functions
    description: Functions management (create, delete, list, etc.)
paths:
  /functions/{function_id}/runs:
    get:
      tags:
        - functions
      summary: List Function Runs By Function Id
      operationId: list_function_runs_by_function_id
      parameters:
        - name: function_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Function Id
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Number of items per page
            default: 10
            title: Page Size
          description: Number of items per page
        - name: only_active
          in: query
          required: false
          schema:
            type: boolean
            description: Whether to only return active sessions
            default: true
            title: Only Active
          description: Whether to only return active sessions
        - name: only_current_token
          in: query
          required: false
          schema:
            type: boolean
            description: Whether to only return sessions for the current token (apikey)
            default: false
            title: Only Current Token
          description: Whether to only return sessions for the current token (apikey)
        - name: x-notte-request-origin
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Request-Origin
        - name: x-notte-sdk-version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Sdk-Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GetFunctionRunResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    PaginatedResponse_GetFunctionRunResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/GetFunctionRunResponse'
          type: array
          title: Items
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        has_next:
          type: boolean
          title: Has Next
        has_previous:
          type: boolean
          title: Has Previous
          readOnly: true
      type: object
      required:
        - items
        - page
        - page_size
        - has_next
        - has_previous
      title: PaginatedResponse[GetFunctionRunResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GetFunctionRunResponse:
      properties:
        function_id:
          type: string
          title: Function Id
          description: The ID of the function
        function_run_id:
          type: string
          title: Function Run Id
          description: The ID of the function run
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        status:
          type: string
          enum:
            - closed
            - active
            - failed
          title: Status
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
          description: The ID of the session
        logs:
          items:
            type: string
          type: array
          title: Logs
          description: The logs of the workflow run
        variables:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Variables
          description: The variables of the workflow run
        result:
          anyOf:
            - type: string
            - type: 'null'
          title: Result
          description: The result of the workflow run (if any)
        local:
          type: boolean
          title: Local
          description: Whether the workflow has been run locally or on the cloud
          default: false
        workflow_id:
          type: string
          title: Workflow Id
          readOnly: true
        workflow_run_id:
          type: string
          title: Workflow Run Id
          readOnly: true
      type: object
      required:
        - function_id
        - function_run_id
        - created_at
        - updated_at
        - status
        - workflow_id
        - workflow_run_id
      title: GetFunctionRunResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````