Skip to content
Navigation

Facets

Returns value counts per field for the matching events.

GET
/indexes/{index}/logs/facets

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • index
    string
    required

    Index name: lowercase letters, digits, underscores and hyphens. The token's index scope applies as well as its source scope.

    maxLength: 63 · minLength: 1 · pattern: ^[a-z0-9][a-z0-9_-]*$

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
  • services
    array of
    object
    required
    • value
      string
      required
    • count
      integer
      required
      minimum: 0
  • loggers
    array of
    object
    required
    • value
      string
      required
    • count
      integer
      required
      minimum: 0
  • hosts
    array of
    object
    required
    • value
      string
      required
    • count
      integer
      required
      minimum: 0
  • levels
    array of
    object
    required
    • value
      string
      required
    • count
      integer
      required
      minimum: 0
  • sources
    array of
    object
    required
    • value
      string
      required
    • 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

404

Index not found
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