# Get File's Stats

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/file/{id}/stats:
    get:
      summary: Get File's Stats
      deprecated: false
      description: Get file stats by a range
      tags:
        - Snapbyte APIs/Files
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: range
          in: query
          description: Day range to get the stats
          required: false
          schema:
            type: string
            enum:
              - 7d
              - 30d
              - 60d
              - 90d
            x-apidog-enum:
              - value: 7d
                name: ''
                description: ''
              - value: 30d
                name: ''
                description: ''
              - value: 60d
                name: ''
                description: ''
              - value: 90d
                name: ''
                description: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      bucket:
                        type: string
                        description: Data time
                      total_requests:
                        type: string
                        description: 'Number of requests '
                      data_served:
                        type: string
                        description: Number of byte served
                    x-apidog-orders:
                      - bucket
                      - total_requests
                      - data_served
                    required:
                      - bucket
                      - data_served
                      - total_requests
                x-apidog-orders:
                  - data
                required:
                  - data
              example:
                success: true
                data:
                  - bucket: '2025-07-01T00:00:00.000Z'
                    total_requests: '8964'
                    data_served: '96303931'
                  - bucket: '2025-07-02T00:00:00.000Z'
                    total_requests: '2512'
                    data_served: '95965020'
                  - bucket: '2025-07-03T00:00:00.000Z'
                    total_requests: '4895'
                    data_served: '94318545'
                  - bucket: '2025-07-04T00:00:00.000Z'
                    total_requests: '3640'
                    data_served: '88774511'
                  - bucket: '2025-07-05T00:00:00.000Z'
                    total_requests: '1257'
                    data_served: '98754424'
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Snapbyte APIs/Files
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/991601/apis/api-18902257-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.snapbyte.io
    description: Prod Env
security: []

```
