dots.v2.insights.query.byRegion().logs.search.post()
Generated on 27 Oct 2026
from DoTs version
v1.21.0
Usage
client.v2.insights.query.byRegion(region).logs.search.post(body: Logs_search_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Logs_search_response>Description
To search log records in a region, send a POST request to /v2/insights/query/{region}/logs/search with a JSON body describing the time range, optional filter, ordering, and pagination.
The time range must not exceed 7 days. pagination.limit defaults to 100 and is clamped to 1000. Cursor pagination requires ordering by timestamp alone; other sort orders return has_more: false and cannot be paged.
Parameters
Path Parameters
regionstring requiredExample:
nyc3The datacenter region slug for the query.
Request Body
timeRangeobject requiredAn inclusive query time window.
Show child properties
fromobject requiredA single point in time. Exactly one value form is set per message.
Show child properties
absolutestring optionalExample:
2026-09-01T00:00:00ZAn absolute timestamp. Accepts RFC3339/RFC3339Nano strings or Unix seconds/nanoseconds as decimal strings.
relativestring optionalExample:
1hA relative time. Use
nowfor the current time, a bare duration such as1hor7dto look back from now, or an offset such asnow-1hornow+30m. Supported units ares,m,h,d, andw.unixNanostring optionalExample:
1756684800000000000A Unix nanosecond timestamp, encoded as a string to preserve 64-bit precision.
toobject requiredA single point in time. Exactly one value form is set per message.
Show child properties
absolutestring optionalExample:
2026-09-01T00:00:00ZAn absolute timestamp. Accepts RFC3339/RFC3339Nano strings or Unix seconds/nanoseconds as decimal strings.
relativestring optionalExample:
1hA relative time. Use
nowfor the current time, a bare duration such as1hor7dto look back from now, or an offset such asnow-1hornow+30m. Supported units ares,m,h,d, andw.unixNanostring optionalExample:
1756684800000000000A Unix nanosecond timestamp, encoded as a string to preserve 64-bit precision.
filterobject optionalA boolean filter tree for logs queries. Exactly one node is set per message.
Show child properties
conditionobject optionalA single field comparison in a logs filter expression.
Show child properties
fieldobject requiredA reference to a logical field for filters, ordering, grouping, or facets.
Show child properties
namestring requiredExample:
service.nameThe field name. Intrinsic columns include
timestamp,severity_text,severity_number,body,trace_id,span_id, andtrace_flags. The dotted shorthandsservice.name,resource.type, andresource.urnare also supported. Arbitrary resource or log attributes can be accessed withResourceAttributes['key']orLogAttributes['key'].scopestring optionalThe attribute scope to resolve the field against. Omit to let the server apply its default mapping for the field name.
operatorstring requiredThe comparison operator.
valueobject optionalA typed literal or list value for a filter condition. Exactly one kind is set per message.
Show child properties
stringValuestring optionalExample:
droplet-123numberValuenumber optionalExample:
42boolValueboolean optionalExample:
truestringArrayValueobject optionalnumberArrayValueobject optional
andobject optionalShow child properties
expressionsarray of objects required
orobject optionalShow child properties
expressionsarray of objects required
notobject optionalA boolean filter tree for logs queries. Exactly one node is set per message.
textSearchobject optionalA substring search across the log body, service name, and resource URN.
Show child properties
querystring requiredExample:
errorThe search string.
orderByarray of objects optionalSort clauses applied to the result set.
Show child properties
fieldobject requiredA reference to a logical field for filters, ordering, grouping, or facets.
Show child properties
namestring requiredExample:
service.nameThe field name. Intrinsic columns include
timestamp,severity_text,severity_number,body,trace_id,span_id, andtrace_flags. The dotted shorthandsservice.name,resource.type, andresource.urnare also supported. Arbitrary resource or log attributes can be accessed withResourceAttributes['key']orLogAttributes['key'].scopestring optionalThe attribute scope to resolve the field against. Omit to let the server apply its default mapping for the field name.
directionstring optionalThe sort direction. Omit to use the server default.
paginationobject optionalOpaque keyset pagination request. Cursors are only valid when ordering by
timestampalone.Show child properties
limitinteger optionalExample:
100Maximum number of results to return. Defaults to 100 and is clamped to 1000.
cursorstring optionalExample:
eyJ0cyI6MTc1NjY4NDgwMDAwMDAwMDAwfQOpaque cursor from a previous response.
Request Sample
Response Example
More Information
See /v2/insights/query/{region}/logs/search in the API reference for additional detail on responses, headers, parameters, and more.