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

# GET /admin/api/logs/captures/{id}



## OpenAPI

````yaml /generated/openapi.json get /admin/api/logs/captures/{id}
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/logs/captures/{id}:
    get:
      tags:
        - Management
      summary: GET /admin/api/logs/captures/{id}
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - description: Administrative scope selected by the caller.
          in: header
          name: x-gproxy-admin-scope
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_CaptureDetailDto'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Output_CaptureDetailDto:
      description: One physical capture, readable even when the downstream log is disabled.
      properties:
        events:
          items:
            $ref: '#/components/schemas/Output_CaptureEventDto'
          type: array
        eventsTruncated:
          type: boolean
        record:
          $ref: '#/components/schemas/Output_CaptureRecordDto'
      required:
        - record
        - events
        - eventsTruncated
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_CaptureEventDto:
      description: One stream chunk or websocket message.
      properties:
        captureId:
          type: string
        direction:
          description: '`request` (client to gateway, gateway to provider) or `response`.'
          type: string
        kind:
          description: '`bytes`, `ws_text`, `ws_binary`, `ws_ping`, `ws_pong` or `ws_close`.'
          type: string
        observedAtMs:
          format: int64
          type: integer
        payload:
          $ref: '#/components/schemas/Output_LogBodyDto'
        sequence:
          description: Monotonic across both directions of the exchange or connection.
          format: int64
          type: integer
        turnId:
          type:
            - string
            - 'null'
      required:
        - captureId
        - sequence
        - turnId
        - direction
        - kind
        - payload
        - observedAtMs
      type: object
    Output_CaptureRecordDto:
      description: One captured exchange in full, downstream or upstream.
      properties:
        agentAssignmentId:
          type:
            - string
            - 'null'
        apiKeyId:
          type:
            - string
            - 'null'
        attemptId:
          type:
            - string
            - 'null'
        attemptOrdinal:
          format: int32
          type:
            - integer
            - 'null'
        clientIp:
          type:
            - string
            - 'null'
        credentialId:
          type:
            - string
            - 'null'
        endedAtMs:
          format: int64
          type:
            - integer
            - 'null'
        error:
          type:
            - string
            - 'null'
        firstResponseAtMs:
          format: int64
          type:
            - integer
            - 'null'
        id:
          type: string
        initiatorRequestId:
          description: >-
            Initiating request for provenance; actual associations are
            many-to-many.
          type:
            - string
            - 'null'
        kind:
          description: '`http`, `ws_connection` or `ws_turn`.'
          type: string
        metrics:
          description: >-
            Upstream-native usage for this one exchange, when the channel
            reported

            any. Billed usage is on the usage record, not here.
        model:
          type:
            - string
            - 'null'
        operation:
          type:
            - string
            - 'null'
        providerId:
          type:
            - string
            - 'null'
        reason:
          type:
            - string
            - 'null'
        requestBody:
          $ref: '#/components/schemas/Output_LogBodyDto'
        requestFraming:
          description: |-
            `buffered`, `bytes`, `sse`, `ndjson`, `json_array` or `websocket`.
            HTTP bodies are reconstructed regardless of transport framing;
            WebSocket messages retain their boundaries in the events.
          type: string
        requestHeaders:
          description: '`[[name, value], …]`, repeated headers preserved.'
        requestMethod:
          type:
            - string
            - 'null'
        requestQuery:
          type:
            - string
            - 'null'
        requestUrl:
          type:
            - string
            - 'null'
        responseBody:
          $ref: '#/components/schemas/Output_LogBodyDto'
        responseFraming:
          type: string
        responseHeaders: true
        responseStatus:
          format: int32
          type:
            - integer
            - 'null'
        sessionId:
          type:
            - string
            - 'null'
        side:
          description: '`downstream` or `upstream`.'
          type: string
        startedAtMs:
          format: int64
          type: integer
        state:
          type: string
        streamKey:
          type:
            - string
            - 'null'
        userId:
          type:
            - string
            - 'null'
      required:
        - id
        - initiatorRequestId
        - attemptId
        - attemptOrdinal
        - side
        - kind
        - sessionId
        - streamKey
        - userId
        - apiKeyId
        - providerId
        - credentialId
        - agentAssignmentId
        - model
        - operation
        - requestMethod
        - requestUrl
        - requestQuery
        - requestHeaders
        - requestBody
        - requestFraming
        - responseStatus
        - responseHeaders
        - responseBody
        - responseFraming
        - clientIp
        - metrics
        - state
        - error
        - reason
        - startedAtMs
        - firstResponseAtMs
        - endedAtMs
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Output_LogBodyDto:
      description: One captured body, or the reason there is none.
      properties:
        bytes:
          description: Reconstructed body bytes, not the length of `content`.
          format: uint64
          minimum: 0
          type: integer
        content:
          type: string
        encoding:
          $ref: '#/components/schemas/Output_LogBodyEncoding'
        state:
          description: >-
            The record's own `body_state`: `not_captured`, `recording`,

            `complete`, `partial` or `failed`. `not_captured` with zero bytes is
            a

            body nobody stored; `complete` with zero bytes is a body that was

            genuinely empty.
          type: string
        truncated:
          description: >-
            Compatibility field: false, because reads return the complete stored
            payload.
          type: boolean
      required:
        - state
        - encoding
        - truncated
        - bytes
        - content
      type: object
    Output_LogBodyEncoding:
      description: How a body's bytes are spelled in `content`.
      oneOf:
        - const: utf8
          description: Valid UTF-8.
          type: string
        - const: base64
          description: Standard base64 with padding, for bytes that are not text.
          type: string
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey
    consoleSession:
      in: cookie
      name: gproxy_session
      type: apiKey

````

## Related topics

- [GET /admin/api/logs/downstream](https://gproxy.leenhawk.com/api-reference/management/get-adminapilogsdownstream.md)
- [GET /admin/api/logs/upstream](https://gproxy.leenhawk.com/api-reference/management/get-adminapilogsupstream.md)
- [GET /admin/api/logs/downstream/{id}](https://gproxy.leenhawk.com/api-reference/management/get-adminapilogsdownstream-1.md)
- [GET /admin/api/credentials/{id}/quota-observations](https://gproxy.leenhawk.com/api-reference/management/get-adminapicredentials-quota-observations.md)
- [GET /admin/api/api-keys/{id}](https://gproxy.leenhawk.com/api-reference/management/get-adminapiapi-keys-1.md)


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