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

# Get paginated request log entries

> GoModel API reference for GET /admin/request-logs: Get paginated request log entries.



## OpenAPI

````yaml /openapi.json get /admin/request-logs
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, Fireworks AI, Meta, OpenRouter, Kilo AI, DeepSeek, Z.ai, xAI,
    MiniMax, Xiaomi MiMo, Mistral AI, OpenCode Go, Oracle, Ollama, Bailian).
    Drop-in OpenAI-compatible API.
  title: GoModel API
  contact: {}
  version: '1.0'
servers:
  - url: '{base_url}'
    description: Edit the base URL to point at your GoModel deployment.
    variables:
      base_url:
        default: http://localhost:8080
        description: Your GoModel deployment URL
security: []
paths:
  /admin/request-logs:
    get:
      tags:
        - admin
      summary: Get paginated request log entries
      description: |-
        Entries are slimmed for the wire: request/response bodies,
        per-attempt error bodies, and rewritten revision bodies are
        omitted (bodies_omitted=true). Fetch /admin/request-logs/detail for
        the full payload of one entry.
      parameters:
        - description: Number of days (default 30)
          name: days
          in: query
          schema:
            type: integer
        - description: Start date (YYYY-MM-DD)
          name: start_date
          in: query
          schema:
            type: string
        - description: End date (YYYY-MM-DD)
          name: end_date
          in: query
          schema:
            type: string
        - description: Filter by requested model selector
          name: requested_model
          in: query
          schema:
            type: string
        - description: Filter by provider name or provider type
          name: provider
          in: query
          schema:
            type: string
        - description: Filter by HTTP method
          name: method
          in: query
          schema:
            type: string
        - description: Filter by request path
          name: path
          in: query
          schema:
            type: string
        - description: Filter by tracked user path subtree
          name: user_path
          in: query
          schema:
            type: string
        - description: >-
            Filter by user paths starting with this text (case-sensitive,
            index-served)
          name: user_path_prefix
          in: query
          schema:
            type: string
        - description: >-
            Filter by requested or resolved model starting with this text
            (case-sensitive, index-served)
          name: model_prefix
          in: query
          schema:
            type: string
        - description: Filter by exact request id
          name: request_id
          in: query
          schema:
            type: string
        - description: Filter by exact session id
          name: session_id
          in: query
          schema:
            type: string
        - description: Filter by error type
          name: error_type
          in: query
          schema:
            type: string
        - description: Filter by status code
          name: status_code
          in: query
          schema:
            type: integer
        - description: Filter by stream mode (true/false)
          name: stream
          in: query
          schema:
            type: boolean
        - description: >-
            Comma-separated endpoint operations to hide, e.g.
            mcp,provider_passthrough,audio_speech; other entries, including
            unclassified ones, stay
          name: exclude_operation
          in: query
          schema:
            type: string
        - description: >-
            Search across
            request_id/requested_model/provider/method/path/session_id/error_type/error_message
          name: search
          in: query
          schema:
            type: string
        - description: Page size (default 25, max 100)
          name: limit
          in: query
          schema:
            type: integer
        - description: Offset for pagination
          name: offset
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/admin.requestLogListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
      security:
        - BearerAuth: []
components:
  schemas:
    admin.requestLogListResponse:
      type: object
      properties:
        as_of:
          description: |-
            AsOf is when the server read the page, in unix microseconds on its
            clock. A dashboard compares it with the write stamp of another
            replica's live entry to tell whether this page already counted it.
          type: integer
        entries:
          type: array
          items:
            $ref: '#/components/schemas/admin.requestLogEntryResponse'
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
    core.GatewayError:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
        param:
          type: string
          nullable: true
        provider:
          type: string
        status_code:
          type: integer
        type:
          $ref: '#/components/schemas/core.ErrorType'
    admin.requestLogEntryResponse:
      type: object
      properties:
        alias_used:
          type: boolean
        auth_key_id:
          type: string
        auth_method:
          type: string
        bodies_omitted:
          description: >-
            BodiesOmitted marks a list entry whose request/response bodies (and

            other heavy payloads) were stripped server-side; the full entry is

            available from GET /admin/request-logs/detail. It also tells the
            dashboard

            the entry is persisted — a slim entry is never an in-flight request.
          type: boolean
        cache_type:
          type: string
        client_ip:
          type: string
        conversation_payload:
          description: |-
            ConversationPayload reports that the entry's (stripped) bodies were
            shaped like a conversation, preserving the Interactions-drawer
            eligibility signal the dashboard otherwise sniffs from the bodies.
          type: boolean
        data:
          description: Data contains flexible request/response information as JSON
          allOf:
            - $ref: '#/components/schemas/requestlog.LogData'
        duration_ns:
          description: DurationNs is the request duration in nanoseconds
          type: integer
        error_type:
          type: string
        id:
          description: ID is a unique identifier for this log entry (UUID)
          type: string
        method:
          type: string
        path:
          type: string
        principal_id:
          type: string
        provider:
          description: canonical provider type used for routing and filters
          type: string
        provider_name:
          type: string
        request_id:
          description: Extracted fields for efficient filtering (indexed in relational DBs)
          type: string
        requested_model:
          description: Core fields (indexed for queries)
          type: string
        resolved_model:
          type: string
        session_id:
          type: string
        status_code:
          type: integer
        stream:
          type: boolean
        timestamp:
          description: Timestamp is when the request started
          type: string
        usage:
          $ref: '#/components/schemas/usage.RequestUsageSummary'
        user_path:
          type: string
        workflow_version_id:
          type: string
    core.ErrorType:
      type: string
      enum:
        - provider_error
        - rate_limit_error
        - invalid_request_error
        - authentication_error
        - not_found_error
        - permission_error
        - internal_error
      x-enum-varnames:
        - ErrorTypeProvider
        - ErrorTypeRateLimit
        - ErrorTypeInvalidRequest
        - ErrorTypeAuthentication
        - ErrorTypeNotFound
        - ErrorTypePermission
        - ErrorTypeInternal
    requestlog.LogData:
      type: object
      properties:
        api_key_hash:
          type: string
        attempts:
          description: |-
            Attempts captures provider calls made for this logical request. SQL
            stores split this into audit_log_attempts; Mongo stores it embedded.
          type: array
          items:
            $ref: '#/components/schemas/requestlog.AttemptSnapshot'
        error_code:
          type: string
        error_message:
          description: Error details (message can be long, so kept in JSON)
          type: string
        error_provider:
          description: >-
            ErrorProvider names the upstream provider an error came from; empty
            when

            the gateway itself raised the error (authentication, validation,
            budget,

            ...), which tells a provider's 401 apart from a rejected gateway
            key.
          type: string
        event_type:
          description: |-
            EventType identifies non-request security lifecycle entries written
            through the extension authentication event recorder.
          type: string
        failover:
          description: |-
            Failover captures runtime redirect details when translated execution
            moved from the primary selector to a configured failover target.
          allOf:
            - $ref: '#/components/schemas/requestlog.FailoverSnapshot'
        guardrails:
          description: |-
            Guardrails records the outcome of every guardrail (plugin instance)
            that ran for the request, in execution order across the prompt,
            response and stream phases: what each decided, whether it edited the
            request or response, and how it failed. It is the decision trail;
            RequestRevisions is the body trail. A configured step without an
            outcome did not run (an earlier block, a cache hit).
          type: array
          items:
            $ref: '#/components/schemas/requestlog.GuardrailOutcomeSnapshot'
        labels:
          description: Labels are request labels extracted from configured tagging headers.
          type: array
          items:
            type: string
        max_tokens:
          type: integer
        request_body:
          description: >-
            Optional bodies (when LOGGING_LOG_BODIES=true). Captured JSON is
            kept

            as json.RawMessage; other captures (string fallbacks, audio/image
            logs,

            stream-built responses) keep their own types. The MongoDB writer
            decodes

            raw JSON into documents so they stay queryable — see body.go.
        request_body_too_big_to_handle:
          description: Body capture status flags (set when body exceeds 1MB limit)
          type: boolean
        request_headers:
          description: |-
            Optional headers (when LOGGING_LOG_HEADERS=true)
            Sensitive headers are auto-redacted
          type: object
          additionalProperties:
            type: string
        request_revisions:
          description: >-
            RequestRevisions captures the ingress request-rewrite chain: one
            entry

            per registered rewriter that ran, in application order, followed by
            the

            prompt-guardrail steps. Rewriters that changed the body carry the

            rewritten body; those that left it alone are recorded with NoChange
            so

            the request log still shows the step ran. Each prompt guardrail that

            edited the prompt is a changed revision, in step order, carrying the

            request as it stood right after that step (the next step's input)
            with

            its sizes; one that objected (warn, block, respond) or failed
            without

            editing is a NoChange entry carrying the decision, and a silent
            allow

            leaves no entry. RequestBody always remains the original client

            request; the last changed revision is what was forwarded downstream
            —

            when every step was a no-op there is no such revision and the
            original

            body is what went upstream.
          type: array
          items:
            $ref: '#/components/schemas/requestlog.RequestRevisionSnapshot'
        response_body: {}
        response_body_too_big_to_handle:
          type: boolean
        response_headers:
          type: object
          additionalProperties:
            type: string
        temperature:
          description: Request parameters
          type: number
        user_agent:
          description: Identity
          type: string
        workflow_features:
          description: >-
            WorkflowFeatures captures the request-time effective workflow
            features

            after runtime caps were applied. This keeps request log views
            historically accurate

            even if the active process config changes later.
          allOf:
            - $ref: '#/components/schemas/requestlog.WorkflowFeaturesSnapshot'
    usage.RequestUsageSummary:
      type: object
      properties:
        cache_write_input_tokens:
          type: integer
        cached_input_ratio:
          type: number
        cached_input_tokens:
          type: integer
        entries:
          type: integer
        estimated_cached_characters:
          type: integer
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        rewrite_cost_saved:
          type: number
        rewrite_tokens_saved:
          type: integer
        total_tokens:
          type: integer
        uncached_input_tokens:
          type: integer
    requestlog.AttemptSnapshot:
      type: object
      properties:
        duration_ns:
          type: integer
        error_code:
          type: string
        error_message:
          type: string
        error_type:
          type: string
        kind:
          type: string
        model:
          type: string
        provider_name:
          type: string
        provider_type:
          type: string
        response_body:
          description: >-
            ResponseBody and ResponseHeaders capture the raw upstream error
            response

            of a failed attempt. ResponseBody is the parsed JSON (or a string
            when the

            body is not JSON); ResponseHeaders is redacted. Both are populated
            only

            when request log body/header logging is enabled.
        response_headers:
          type: object
          additionalProperties:
            type: string
        seq:
          type: integer
        started_at:
          type: string
        status_code:
          type: integer
        success:
          type: boolean
    requestlog.FailoverSnapshot:
      type: object
      properties:
        target_model:
          type: string
    requestlog.GuardrailOutcomeSnapshot:
      type: object
      properties:
        action:
          description: >-
            Action is the decision (allow, warn, block, respond) or "failure"
            when

            the instance errored; FailMode then says whether the chain carried
            on

            ("open") or the request failed ("closed").
          type: string
        code:
          type: string
        detail: {}
        dropped_events:
          type: integer
        duration_ns:
          type: integer
        edited:
          description: |-
            Edited reports that the instance changed the request (prompt phase)
            or the response (response and stream phases); Target names which.
          type: boolean
        error:
          type: string
        fail_mode:
          type: string
        instance:
          type: string
        message:
          type: string
        phase:
          type: string
        replaced_events:
          description: >-
            ReplacedEvents and DroppedEvents count the stream events an
            in-flight

            stream instance rewrote or withheld.
          type: integer
        seq:
          type: integer
        step:
          type: integer
        target:
          type: string
        type:
          type: string
    requestlog.RequestRevisionSnapshot:
      type: object
      properties:
        body:
          description: >-
            Body is the request body after this revision (the raw JSON, or a
            string

            when not valid JSON — see body.go). Populated only when body logging
            is

            enabled and the body is within the capture limit.
        bytes_after:
          type: integer
        bytes_before:
          type: integer
        detail:
          description: |-
            Detail is an optional rewriter-provided structured summary of what
            changed (for example a compression block report).
        no_change:
          description: >-
            NoChange marks a rewriter that ran and left the body untouched. Such

            revisions record the step for operators — BytesAfter equals
            BytesBefore,

            Body is empty and TokensSaved is zero, though Detail may explain why

            nothing changed — but are not part of the chain that produced the

            forwarded request. Absent on entries written before no-change steps
            were

            tracked, which is why the flag is positive: an old revision always

            changed the body.
          type: boolean
        rewriter:
          type: string
        seq:
          type: integer
        tokens_saved:
          description: |-
            TokensSaved is the rewriter-reported estimate of prompt tokens this
            revision saved (e.g. token compression); zero when the rewriter does
            not report savings.
          type: integer
    requestlog.WorkflowFeaturesSnapshot:
      type: object
      properties:
        audit:
          type: boolean
        budget:
          type: boolean
        cache:
          type: boolean
        failover:
          type: boolean
        guardrails:
          type: boolean
        usage:
          type: boolean
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.