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

# Retrieve a sandbox request log



## OpenAPI

````yaml https://api.twinbay.ai/openapi.json get /sandboxes/{sandbox_id}/logs/{request_id}
openapi: 3.1.0
info:
  title: Twinbay
  description: Backend API
  version: 0.1.0
servers:
  - url: https://api.twinbay.ai
    description: Production
security: []
tags:
  - name: healthchecks
    description: Healthcheck endpoints
  - name: users
    description: >-
      The current user. Sign-up and sign-in happen in WorkOS AuthKit, which
      issues the access tokens this API accepts.
  - name: organizations
    description: >-
      Organizations the caller belongs to. Every authenticated request acts
      inside exactly one organization — the one its access token names — so
      these routes address it as `current`.
  - name: api-keys
    description: >-
      Long-lived credentials for callers that cannot hold an AuthKit session —
      agents, SDKs, CI. A key is accepted wherever an access token is, and acts
      with the role its creator holds when the request arrives.
  - name: sandboxes
    description: >-
      Create and edit isolated provider sandboxes. Each sandbox contains
      behavioural twins from the `twins` package.
  - name: twins
    description: Browse the digital twins available for new sandboxes.
paths:
  /sandboxes/{sandbox_id}/logs/{request_id}:
    get:
      tags:
        - sandboxes
      summary: Retrieve a sandbox request log
      operationId: get_request_log
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Sandbox Id
        - name: request_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Request Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestLogResponse'
        '401':
          description: The credential is missing, malformed, expired, or not trusted
        '403':
          description: The credential does not act inside an organization
        '404':
          description: Request log not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Access token: []
        - Organization API key: []
components:
  schemas:
    RequestLogResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        sandbox_id:
          type: string
          format: uuid
          title: Sandbox Id
        sandbox_twin_id:
          type: string
          format: uuid
          title: Sandbox Twin Id
        method:
          type: string
          title: Method
        path:
          type: string
          title: Path
        query_string:
          type: string
          title: Query String
        status_code:
          type: integer
          title: Status Code
        duration_ms:
          type: integer
          title: Duration Ms
        occurred_at:
          type: string
          format: date-time
          title: Occurred At
        request:
          anyOf:
            - $ref: '#/components/schemas/RequestLogBody'
            - type: 'null'
        response:
          anyOf:
            - $ref: '#/components/schemas/RequestLogBody'
            - type: 'null'
      type: object
      required:
        - id
        - sandbox_id
        - sandbox_twin_id
        - method
        - path
        - query_string
        - status_code
        - duration_ms
        - occurred_at
        - request
        - response
      title: RequestLogResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RequestLogBody:
      properties:
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        size:
          type: integer
          title: Size
        truncated:
          type: boolean
          title: Truncated
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: Decoded body, or null when the payload is not text.
      type: object
      required:
        - content_type
        - size
        - truncated
      title: RequestLogBody
      description: >-
        A captured payload, as the bytes it was rather than as parsed JSON.


        A twin answers with whatever its provider answers with, so the log holds

        text when it is decodable and says so when it is not. `truncated`
        reports

        that the container capped the capture, not that the caller sent less.
    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:
    Access token:
      type: http
      description: Access token issued by WorkOS AuthKit.
      scheme: bearer
    Organization API key:
      type: apiKey
      description: >-
        An organization API key, as minted by POST
        /organizations/current/api-keys.
      in: header
      name: X-API-Key

````