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

# Query sandbox network logs (Beta)

> GET with body payload — no resources created. Returns the network activities matching the query passed as the request payload. Beta: these log reads may change in incompatible ways before general availability. Search retained network metadata using bounded structured filters and a snapshot cursor, newest first by start. Even a short or empty page may return next_cursor; continue until next_cursor is null. Every response carries a tail_cursor; a request with since set to it returns the activities that started or changed since, with tail_overflow when more changed than page_size; reload the first page when tail_overflow is true. Readable while the sandbox is stopped. Only retained traffic metadata is returned, not request or response bodies, headers, URL paths, or query strings. Capture may be incomplete; an empty result does not prove that no traffic occurred. Access requires the sandbox creator or sandboxes:exec.



## OpenAPI

````yaml /langsmith/langsmith-platform-openapi.json post /api/v2/sandboxes/{sandbox_id}/network-logs/query
openapi: 3.1.0
info:
  title: LangSmith
  description: >+
    The LangSmith API is used to programmatically create and manage LangSmith
    resources.


    ## Host

    https://api.smith.langchain.com


    ## Authentication

    To authenticate with the LangSmith API, set the `X-Api-Key` header

    to a valid [LangSmith API
    key](https://docs.langchain.com/langsmith/create-account-api-key#create-an-api-key).

  version: 0.1.0
servers:
  - url: /
security: []
tags:
  - name: run
    x-group: Tracing
  - name: runs
    x-group: Tracing
  - name: sessions
    x-group: Tracing
  - name: tracer-sessions
    x-group: Tracing
  - name: threads
    x-group: Threads
  - name: datasets
    x-group: Datasets
  - name: examples
    x-group: Datasets
  - name: evaluators
    x-group: Evaluation
  - name: experiment-view-overrides
    x-group: Evaluation
  - name: experiments
    x-group: Evaluation
  - name: annotation-queues
    x-group: Feedback & Annotation
  - name: annotation_queues
    x-group: Feedback & Annotation
  - name: feedback
    x-group: Feedback & Annotation
  - name: feedback-configs
    x-group: Feedback & Annotation
  - name: alert_rules
    x-group: Monitoring
  - name: bulk-exports
    x-group: Monitoring
  - name: charts
    x-group: Monitoring
  - name: commits
    x-group: Prompts & Playground
  - name: directories
    x-group: Prompts & Playground
  - name: hub_environments
    x-group: Prompts & Playground
  - name: playground-settings
    x-group: Prompts & Playground
  - name: prompt-webhooks
    x-group: Prompts & Playground
  - name: prompts
    x-group: Prompts & Playground
  - name: tag-transitions
    x-group: Prompts & Playground
  - name: comments
    x-group: Prompt Hub
  - name: likes
    x-group: Prompt Hub
  - name: optimization-jobs
    x-group: Prompt Hub
  - name: ownerships
    x-group: Prompt Hub
  - name: repos
    x-group: Prompt Hub
  - name: settings
    x-group: Prompt Hub
  - name: tags
    x-group: Prompt Hub
  - name: integrations
    x-group: Integrations & Tools
  - name: mcp
    x-group: Integrations & Tools
  - name: mcp_vendors
    x-group: Integrations & Tools
  - name: oauth
    x-group: Integrations & Tools
  - name: tools
    x-group: Integrations & Tools
  - name: gateway-policies
    x-group: LLM Gateway
  - name: sandboxes
    x-group: Sandboxes
  - name: issues
    x-group: Issues
  - name: issues-agent
    x-group: Issues
  - name: Organizations
    x-group: Administration
  - name: SCIM Tokens
    x-group: Administration
  - name: TTL Settings
    x-group: Administration
  - name: access_policies
    x-group: Administration
  - name: api-key
    x-group: Administration
  - name: audit-logs
    x-group: Administration
  - name: auth
    x-group: Administration
  - name: aws_marketplace
    x-group: Administration
  - name: data_planes
    x-group: Administration
  - name: me
    x-group: Administration
  - name: orgs
    x-group: Administration
  - name: service-accounts
    x-group: Administration
  - name: tenant
    x-group: Administration
  - name: ttl-settings
    x-group: Administration
  - name: usage-limits
    x-group: Administration
  - name: workspaces
    x-group: Administration
  - name: ace
    x-group: System
  - name: backfills
    x-group: System
  - name: features
    x-group: System
  - name: info
    x-group: System
  - name: model-price-map
    x-group: System
  - name: public
    x-group: System
  - name: agents
    x-hidden: true
  - name: custom-apps
  - name: fleet orgs
  - name: fleet secrets
  - name: fleet tenants
  - name: fleet threads
    x-hidden: true
  - name: fleet users
  - name: productfeedback
    x-hidden: true
  - name: rules
  - name: runsanalytics
  - name: sql
  - name: usage
  - name: user-groups
  - name: users
paths:
  /api/v2/sandboxes/{sandbox_id}/network-logs/query:
    post:
      tags:
        - sandboxes
      summary: Query sandbox network logs (Beta)
      description: >-
        GET with body payload — no resources created. Returns the network
        activities matching the query passed as the request payload. Beta: these
        log reads may change in incompatible ways before general availability.
        Search retained network metadata using bounded structured filters and a
        snapshot cursor, newest first by start. Even a short or empty page may
        return next_cursor; continue until next_cursor is null. Every response
        carries a tail_cursor; a request with since set to it returns the
        activities that started or changed since, with tail_overflow when more
        changed than page_size; reload the first page when tail_overflow is
        true. Readable while the sandbox is stopped. Only retained traffic
        metadata is returned, not request or response bodies, headers, URL
        paths, or query strings. Capture may be incomplete; an empty result does
        not prove that no traffic occurred. Access requires the sandbox creator
        or sandboxes:exec.
      parameters:
        - description: Sandbox ID or name
          name: sandbox_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sandboxapi.NetworkHistoryQuery'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sandboxapi.NetworkHistoryQueryResponse'
        '400':
          description: Invalid query or cursor, cursor with since, or query exceeding 4 KiB
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
        '403':
          description: Insufficient sandbox access
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
        '404':
          description: Sandbox not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
        '410':
          description: Cursor expired; restart the query
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
        '429':
          description: Query capacity reached
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
        '502':
          description: Invalid host response
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
        '503':
          description: Network history unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
        '504':
          description: Read timed out
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shared.ProblemDetails'
      security:
        - API Key: []
        - Tenant ID: []
        - Bearer Auth: []
components:
  schemas:
    sandboxapi.NetworkHistoryQuery:
      type: object
      properties:
        auth_verdicts:
          items:
            type: string
          type: array
        cursor:
          type: string
        destination:
          type: string
        destination_ports:
          items:
            type: integer
          type: array
        directions:
          items:
            type: string
          type: array
        from:
          type: string
          format: date-time
        http_statuses:
          items:
            type: integer
          type: array
        methods:
          items:
            type: string
          type: array
        outcomes:
          items:
            type: string
          type: array
        page_size:
          description: Maximum activities per page.
          type: integer
          default: 20
          maximum: 100
          minimum: 0
        parent_activity_id:
          type: string
        policy_verdicts:
          items:
            type: string
          type: array
        protocols:
          items:
            type: string
          type: array
        search:
          type: string
        service_ports:
          items:
            type: integer
          type: array
        since:
          type: string
        sources:
          items:
            type: string
          type: array
        to:
          type: string
          format: date-time
        visibility:
          items:
            type: string
          type: array
    sandboxapi.NetworkHistoryQueryResponse:
      type: object
      properties:
        coverage:
          $ref: '#/components/schemas/sandboxapi.NetworkCoverage'
        items:
          type: array
          items:
            $ref: '#/components/schemas/sandboxapi.NetworkActivity'
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
        snapshot_at:
          type: string
          format: date-time
        tail_cursor:
          type: string
        tail_overflow:
          type: boolean
    shared.ProblemDetails:
      description: RFC 7807 problem details returned on V2 API errors.
      type: object
      properties:
        detail:
          type: string
        details:
          description: >-
            Details is a LangSmith extension carrying structured fields for
            ErrorClass.
          allOf:
            - $ref: '#/components/schemas/shared.ParseErrorDetails'
        error_class:
          description: |-
            ErrorClass is a LangSmith extension sub-categorizing a status code.
            Additional values require expanding this enum and adding a oneOf
            discriminator on Details to keep the class↔details contract typed.
          type: string
          enum:
            - PARSE_FAILURE
        instance:
          type: string
        remedy:
          description: Remedy is a LangSmith extension for user-recoverable errors.
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          type: string
    sandboxapi.NetworkCoverage:
      type: object
      properties:
        acknowledged_dropped:
          description: >-
            This is persisted loss disposition only, not every missing
            observation.
          type: string
          example: '0'
        reason:
          type: string
        registered_sources:
          description: >-
            Registration does not establish that a source is healthy or
            complete.
          type: array
          items:
            type: string
        retention_truncated:
          type: boolean
        state:
          type: string
    sandboxapi.NetworkActivity:
      type: object
      properties:
        activity_id:
          type: string
        activity_version:
          type: integer
        aggregation_count:
          type: integer
        aggregation_unit:
          type: string
        auth_verdict:
          type: string
        byte_scope:
          type: string
        bytes_received:
          type: integer
        bytes_sent:
          type: integer
        decisions:
          type: array
          items:
            $ref: '#/components/schemas/sandboxapi.NetworkDecision'
        destination_host:
          type: string
        destination_ip:
          type: string
        destination_port:
          type: integer
        direction:
          type: string
        dns_query_type:
          type: integer
        dns_response_code:
          type: integer
        ended_at:
          type: string
          format: date-time
        event_id:
          type: string
        failure_reason:
          type: string
        guest_reported:
          type: boolean
        http_status:
          type: integer
        method:
          type: string
        observed_at:
          type: string
          format: date-time
        outcome:
          type: string
        parent_activity_id:
          type: string
        policy_verdict:
          type: string
        producer_id:
          type: string
        producer_sequence:
          type: integer
        protocol:
          type: string
        response_origin:
          type: string
        service_port:
          type: integer
        source:
          type: string
        sources:
          items:
            type: string
          type: array
        started_at:
          type: string
          format: date-time
        visibility:
          type: string
    shared.ParseErrorDetails:
      description: Structured fields describing an adapter parse failure.
      type: object
      required:
        - adapter
        - item_type
      properties:
        adapter:
          type: string
        item_type:
          type: string
        run_id:
          type: string
    sandboxapi.NetworkDecision:
      type: object
      properties:
        layer:
          type: string
        reason:
          type: string
        revision:
          type: string
        verdict:
          type: string
  securitySchemes:
    API Key:
      type: apiKey
      in: header
      name: X-API-Key
    Tenant ID:
      type: apiKey
      in: header
      name: X-Tenant-Id
    Bearer Auth:
      type: http
      description: >-
        Bearer tokens are used to authenticate from the UI. Must also specify
        x-tenant-id or x-organization-id (for org scoped apis).
      scheme: bearer

````