LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithresourcessandboxesnetwork_logsNetworkLogsResourcequery
Method●Since v0.16

query

Copy
query(
  self,
  sandbox_id: str,
  *,
  auth_verdicts: SequenceNotStr
View source on GitHub
[
str
]
|
Omit
=
omit
,
cursor
:
str
|
Omit
=
omit
,
destination
:
str
|
Omit
=
omit
,
destination_ports
:
Iterable
[
int
]
|
Omit
=
omit
,
directions
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
from_
:
Union
[
str
,
datetime
]
|
Omit
=
omit
,
http_statuses
:
Iterable
[
int
]
|
Omit
=
omit
,
methods
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
outcomes
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
page_size
:
int
|
Omit
=
omit
,
parent_activity_id
:
str
|
Omit
=
omit
,
policy_verdicts
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
protocols
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
search
:
str
|
Omit
=
omit
,
service_ports
:
Iterable
[
int
]
|
Omit
=
omit
,
since
:
str
|
Omit
=
omit
,
sources
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
to
:
Union
[
str
,
datetime
]
|
Omit
=
omit
,
visibility
:
SequenceNotStr
[
str
]
|
Omit
=
omit
,
extra_headers
:
Headers
|
None
=
None
,
extra_query
:
Query
|
None
=
None
,
extra_body
:
Body
|
None
=
None
,
timeout
:
float
|
httpx
.
Timeout
|
None
|
NotGiven
=
not_given
)
->
NetworkLogQueryResponse

Parameters

NameTypeDescription
page_sizeint | Omit
Default:omit

Maximum activities per page.

extra_headersHeaders | None
Default:None

Send extra headers

extra_queryQuery | None
Default:None
extra_bodyBody | None
Default:None
timeoutfloat | httpx.Timeout | None | NotGiven
Default:not_given

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.

Add additional query parameters to the request

Add additional JSON properties to the request

Override the client-level default timeout for this request, in seconds