> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Count logs

> Counts the log entries in Elasticsearch that match the supplied query and returns the total number of hits. The target index is selected with the optional index query parameter, which defaults to filebeat-*.



## OpenAPI

````yaml /schema.json post /logs/count
openapi: 3.1.0
info:
  version: 01KV4EC0SHV95TK2YR66AMKFZC
  title: Alumio API
  description: Access Alumio through OpenAPI v3.1.
servers:
  - url: /api/v1
security: []
paths:
  /logs/count:
    post:
      tags:
        - Log
      summary: Count logs
      description: >-
        Counts the log entries in Elasticsearch that match the supplied query
        and returns the total number of hits. The target index is selected with
        the optional index query parameter, which defaults to filebeat-*.
      operationId: getLogCounts
      parameters:
        - name: index
          in: query
          description: Index to use
          required: false
          schema:
            type: string
            default: filebeat-*
        - name: space
          in: query
          description: Space Identifier
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchLogsQuery'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElasticSearchCountResult'
        default:
          description: Unexpected Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SearchLogsQuery:
      type: object
      properties:
        parameters:
          type: object
    ElasticSearchCountResult:
      type: object
      additionalProperties: true
    Error:
      type: object
      properties:
        status:
          type: string
        context:
          type: object
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        violations:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              propertyPath:
                type: string
              type:
                type: string

````