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

# Get Account Traffic Stats

> Requires the `stats.read` token ability.



## OpenAPI

````yaml /api-reference/openapi.json get /stats
openapi: 3.1.0
info:
  title: Hosting Panel API
  version: 1.0.0
  description: >-
    The customer-facing hosting panel API. A request is scoped to the hosting
    account its bearer token belongs to; the token abilities decide which
    endpoints it may call.
servers:
  - url: https://hosting-panel.net/api/v1
security:
  - sanctum: []
tags:
  - name: Account
  - name: Domains
  - name: DNS
  - name: Email Accounts
  - name: Forwarders
  - name: Databases
  - name: FTP Accounts
  - name: Cron Jobs
  - name: URL Schedules
  - name: Node.js Applications
  - name: Valkey
  - name: Photon Optimizer
  - name: Statistics
  - name: PSI Metrics
  - name: PHP Versions
paths:
  /stats:
    get:
      tags:
        - Statistics
      summary: Get Account Traffic Stats
      description: Requires the `stats.read` token ability.
      operationId: stats.account
      responses:
        '200':
          description: '`StatsResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/StatsResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
components:
  schemas:
    StatsResource:
      type: object
      properties:
        days:
          type: integer
        scope:
          type: string
        dns:
          type: object
          properties:
            total:
              type: integer
            series:
              type: array
              items:
                $ref: '#/components/schemas/StatsDnsPointResource'
          required:
            - total
            - series
        http:
          type:
            - object
            - 'null'
          properties:
            requests:
              type: integer
            bytes:
              type: integer
            series:
              type: array
              items:
                $ref: '#/components/schemas/StatsHttpPointResource'
          required:
            - requests
            - bytes
            - series
      required:
        - days
        - scope
        - dns
        - http
      title: StatsResource
    StatsDnsPointResource:
      type: object
      properties:
        date:
          type: string
        A:
          type: integer
        AAAA:
          type: integer
        CNAME:
          type: integer
        HTTPS:
          type: integer
        MX:
          type: integer
        TXT:
          type: integer
        NS:
          type: integer
        DNSSEC:
          type: integer
        other:
          type: integer
      required:
        - date
        - A
        - AAAA
        - CNAME
        - HTTPS
        - MX
        - TXT
        - NS
        - DNSSEC
        - other
      title: StatsDnsPointResource
    StatsHttpPointResource:
      type: object
      properties:
        date:
          type: string
        2xx:
          type: integer
        3xx:
          type: integer
        4xx:
          type: integer
        5xx:
          type: integer
        other:
          type: integer
      required:
        - date
        - 2xx
        - 3xx
        - 4xx
        - 5xx
        - other
      title: StatsHttpPointResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    sanctum:
      type: http
      description: >-
        An API access token, sent as `Authorization: Bearer <token>`. Its
        abilities decide which endpoints it may call.
      scheme: bearer

````