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

# Headline counts for a window

> Latency quantiles are approximate by design; an exact quantile over millions of rows is not worth the scan.



## OpenAPI

````yaml /api-reference/logs.json get /api/logs/summary
openapi: 3.1.0
info:
  title: Truscan Logs
  version: 1.0.0
  description: >-
    Request history. The edge records every authenticated API call and this
    service serves it back to the account that made it. Bodies are never stored
    — only method, path, status, duration and source. Every response uses the
    {success, result, message} envelope except where noted.
servers:
  - url: https://api.truscan.co
    description: Production
security: []
tags:
  - name: logs
    description: Request history
paths:
  /api/logs/summary:
    get:
      tags:
        - logs
      summary: Headline counts for a window
      description: >-
        Latency quantiles are approximate by design; an exact quantile over
        millions of rows is not worth the scan.
      parameters:
        - name: days
          in: query
          schema:
            type: integer
            default: 7
            maximum: 90
          description: Look-back window. Clamped to the maximum.
      responses:
        '200':
          description: Counts for the window.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/Summary'
        '401':
          description: Missing or invalid credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    Envelope:
      type: object
      required:
        - success
        - result
        - message
      properties:
        success:
          type: boolean
        result: {}
        message:
          type: string
    Summary:
      type: object
      properties:
        total:
          type: integer
        failed:
          type: integer
          description: Requests that returned 400 or above.
        median_ms:
          type: integer
        p95_ms:
          type: integer
        error_pct:
          type: number
    Error:
      type: object
      required:
        - success
        - result
        - message
      properties:
        success:
          type: boolean
          const: false
        result:
          type: object
          properties:
            code:
              type: string
              description: Stable identifier to branch on. Match this, never the message.
        message:
          type: string
          description: Written for a person and safe to display.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A dashboard session JWT or a tru_ API key. Both work on every protected
        route.

````