Skip to content
  • Auto
  • Light
  • Dark
Get Started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

List

client.telemetry.logs.list(LogListParams { direction, limit, branch_ids, 4 more } query, RequestOptionsoptions?): LogListResponse { data, links }
get/v1/telemetry/logs

Get OpenTelemetry logs within a specified time window with flexible pagination options: Pass in only the end time to paginate backwards from there. Pass in a start time to paginate backwards from now until the start time. Pass in both to get resources within the time window. Filter additionally by branch_ids or file_id.

ParametersExpand Collapse
query: LogListParams { direction, limit, branch_ids, 4 more }
direction: "asc" | "desc"

Sort direction for the traces. Defaults to descending order of timestamp.

Accepts one of the following:
"asc"
"desc"
limit: number

Maximum items to return in each paginated response

minimum1
maximum100
branch_ids?: Array<string>

Branch IDs to filter by

end?: string

End date of the time window (latest time)

formatdate-time
file_id?: string

Include only resources from a given file identified by its ID

formatuuid
start?: string

Start date of the time window (earliest time)

formatdate-time
trace_ids?: Array<string>
ReturnsExpand Collapse
LogListResponse { data, links }

A paginated result set

data: Array<Data>
attributes: Array<Attribute>
key: string
value: Value { arrayValue, boolValue, bytesValue, 4 more }
arrayValue?: unknown
boolValue?: boolean
bytesValue?: string
doubleValue?: number
intValue?: string
kvlistValue?: unknown
stringValue?: string
body: Body { arrayValue, boolValue, bytesValue, 4 more }
arrayValue?: unknown
boolValue?: boolean
bytesValue?: string
doubleValue?: number
intValue?: string
kvlistValue?: unknown
stringValue?: string
severityText: string
timeUnixNano: string
traceId: string

Links to use for pagination

URL of this page

formaturi

URL of the next page, if any

formaturi

URL of the previous page, if any

formaturi
import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

const logs = await client.telemetry.logs.list({ direction: 'asc', limit: 1 });

console.log(logs.data);
{
  "data": [
    {
      "attributes": [
        {
          "key": "key",
          "value": {
            "arrayValue": {},
            "boolValue": true,
            "bytesValue": "bytesValue",
            "doubleValue": 0,
            "intValue": "intValue",
            "kvlistValue": {},
            "stringValue": "stringValue"
          }
        }
      ],
      "body": {
        "arrayValue": {},
        "boolValue": true,
        "bytesValue": "bytesValue",
        "doubleValue": 0,
        "intValue": "intValue",
        "kvlistValue": {},
        "stringValue": "stringValue"
      },
      "severityText": "severityText",
      "timeUnixNano": "timeUnixNano",
      "traceId": "traceId"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}
Returns Examples
{
  "data": [
    {
      "attributes": [
        {
          "key": "key",
          "value": {
            "arrayValue": {},
            "boolValue": true,
            "bytesValue": "bytesValue",
            "doubleValue": 0,
            "intValue": "intValue",
            "kvlistValue": {},
            "stringValue": "stringValue"
          }
        }
      ],
      "body": {
        "arrayValue": {},
        "boolValue": true,
        "bytesValue": "bytesValue",
        "doubleValue": 0,
        "intValue": "intValue",
        "kvlistValue": {},
        "stringValue": "stringValue"
      },
      "severityText": "severityText",
      "timeUnixNano": "timeUnixNano",
      "traceId": "traceId"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}