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

# Get function logs

> Returns logs oldest first. `type=runtime` (default) returns function stdout/stderr. `type=invocations` returns one platform-generated record per HTTP request served.



## OpenAPI

````yaml /openapi/source/external/edge-compute/functions-observability.json get /compute/funcs/{id}/logs
openapi: 3.1.0
info:
  title: Edge Compute Function Observability API
  description: >-
    Customer-facing Edge Compute function logs, metrics, deployment history, and
    ship inspection.
  version: '1.0'
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /compute/funcs/{id}/logs:
    get:
      tags:
        - functions
      summary: Get function logs
      description: >-
        Returns logs oldest first. `type=runtime` (default) returns function
        stdout/stderr. `type=invocations` returns one platform-generated record
        per HTTP request served.
      operationId: GetComputeFunctionLogs
      parameters:
        - name: id
          in: path
          required: true
          description: Function ID
          schema:
            type: string
        - name: type
          in: query
          required: false
          description: Log stream to return.
          schema:
            type: string
            enum:
              - runtime
              - invocations
            default: runtime
        - name: start_time
          in: query
          required: false
          description: Return records at or after this RFC 3339 timestamp.
          schema:
            type: string
            format: date-time
        - name: end_time
          in: query
          required: false
          description: Return records at or before this RFC 3339 timestamp.
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          required: false
          description: Maximum records to return.
          schema:
            type: integer
            minimum: 1
            maximum: 250
      responses:
        '200':
          description: Logs retrieved successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/FuncRuntimeLogsResponse'
                  - $ref: '#/components/schemas/FuncInvocationLogsResponse'
              examples:
                runtime:
                  value:
                    meta:
                      has_more: false
                      partial: false
                    data:
                      - record_type: compute_func_runtime_log
                        timestamp: '2026-09-09T16:00:00.000Z'
                        level: log
                        message: Hello from Edge Compute!
                invocations:
                  value:
                    meta:
                      has_more: false
                      partial: false
                    data:
                      - record_type: compute_func_invocation_log
                        timestamp: '2026-09-09T16:00:01.000Z'
                        method: GET
                        path: /health
                        status_code: 200
                        duration_ms: 2.276
                        request_size_bytes: 0
                        response_size_bytes: 19
                        region: us-east-1
        '400':
          description: Invalid query parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '422':
          description: Invalid function ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
components:
  schemas:
    FuncRuntimeLogsResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/LogsMeta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/FuncRuntimeLog'
    FuncInvocationLogsResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/LogsMeta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/FuncInvocationLog'
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    LogsMeta:
      type: object
      properties:
        has_more:
          type: boolean
        partial:
          type: boolean
    FuncRuntimeLog:
      type: object
      properties:
        record_type:
          type: string
          const: compute_func_runtime_log
        timestamp:
          type: string
          format: date-time
        level:
          type: string
        message:
          type: string
    FuncInvocationLog:
      type: object
      properties:
        record_type:
          type: string
          const: compute_func_invocation_log
        timestamp:
          type: string
          format: date-time
        method:
          type: string
        path:
          type: string
        status_code:
          type: integer
        duration_ms:
          type: number
        request_size_bytes:
          type: integer
        response_size_bytes:
          type: integer
        region:
          type: string
    Error:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````