Skip to content
Navigation

Count events in the default index

Returns the number of matching events.

GET
/logs/count

Authorization

  • bearerAuth
    HTTP
    required

Query parameters

  • from
    integer
    required

    Inclusive Unix milliseconds

  • to
    integer
    required

    Exclusive Unix milliseconds

  • source
    optional
    string

    Comma-separated sources. Defaults to every source the token can read.

  • service
    optional
    string

    Exact service

  • logger
    optional
    string

    Exact logger

  • host
    optional
    string

    Exact host

  • message
    optional
    string

    Literal message substring

  • min_level
    optional
    integer

    Minimum numeric severity

  • filter
    optional
    unknown

    URL-encoded JSON, at most 4096 bytes decoded. Exact, typed matches on top-level attributes; every condition must match, along with the other filters. Missing and null values never match. Duplicate or unknown members and conflicting conditions return 400. The request path and query together are limited to 32768 bytes.

Returns

200

Successful response

JSON
  • count
    integer
    required
    minimum: 0

400

Invalid input
JSON
  • error
    string
    required

401

Missing or invalid token
JSON
  • error
    string
    required

403

Source outside read scope
JSON
  • error
    string
    required

413

Payload exceeds configured budget
JSON
  • error
    string
    required

429

Capacity exhausted; Retry-After: 1
JSON
  • error
    string
    required

503

Storage unavailable
JSON
  • error
    string
    required

504

Query deadline expired
JSON
  • error
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close