> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-support-migration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Edge Script Statistics



## OpenAPI

````yaml https://core-api-public-docs.b-cdn.net/docs/v3/compute.json get /compute/script/{id}/statistics
openapi: 3.0.0
info:
  title: bunny.net Compute API
  description: >-
    <img src='https://bunny.net/v2/images/bunnynet-logo-dark.svg' style='width:
    200px;' alt='bunny.net Logo'>
                   Edge Scripts and Compute API documentation for bunny.net. This API provides endpoints for managing edge scripts, releases, secrets, variables, and other compute-related resources.
  termsOfService: https://bunny.net/tos
  contact:
    name: bunny.net
    url: https://docs.bunny.net
    email: support@bunny.net
  version: 1.0.0
servers:
  - url: https://api.bunny.net
    description: bunny.net API Server
security:
  - AccessKey: []
paths:
  /compute/script/{id}/statistics:
    get:
      tags:
        - Edge Script
      summary: Get Edge Script Statistics
      operationId: EdgeScriptStatisticsEndpoint_GetEdgeScriptStatisticsEndpoint
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the Edge Script for which the statistics will be returned
          schema:
            type: integer
            format: int64
          x-position: 1
        - name: dateFrom
          in: query
          description: >-
            (Optional) The start date of the statistics. If no value is passed,
            the last 30 days will be returned
          schema:
            type: string
            format: date-time
            nullable: true
          x-position: 2
        - name: dateTo
          in: query
          description: >-
            (Optional) The end date of the statistics. If no value is passed,
            the last 30 days will be returned
          schema:
            type: string
            format: date-time
            nullable: true
          x-position: 3
        - name: loadLatest
          in: query
          description: (Optional) Load most recent data as soon as it's available
          schema:
            type: boolean
            default: false
          x-position: 4
        - name: hourly
          in: query
          description: >-
            (Optional) If true, the statistics data will be returned in hourly
            groupping.
          schema:
            type: boolean
            default: false
          x-position: 5
      responses:
        '200':
          description: Returns the statistics for the Edge Script with the given ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EdgeScriptStatisticsModel'
        '401':
          description: The request authorization failed
        '404':
          description: The Edge Script with the requested ID does not exist
        '500':
          description: Internal Server Error
      security:
        - AccessKey:
            - User
            - UserApi
            - SubuserAPICompute
            - SubuserAPIDns
            - SubuserCompute
            - SubuserManage
            - SubuserAPIManage
        - bearer:
            - User
            - UserApi
            - SubuserAPICompute
            - SubuserAPIDns
            - SubuserCompute
            - SubuserManage
            - SubuserAPIManage
components:
  schemas:
    EdgeScriptStatisticsModel:
      type: object
      additionalProperties: false
      properties:
        TotalRequestsServed:
          type: integer
          format: int64
        TotalCpuUsed:
          type: number
          format: double
        TotalMonthlyCost:
          type: number
          format: decimal
        AverageCpuTimePerExecution:
          type: number
          format: double
        RequestsServedChart:
          type: object
          nullable: true
          additionalProperties:
            type: number
            format: double
        AverageCpuTimeChart:
          type: object
          nullable: true
          additionalProperties:
            type: number
            format: double
        TotalCpuTimeChart:
          type: object
          nullable: true
          additionalProperties:
            type: number
            format: double
  securitySchemes:
    AccessKey:
      type: apiKey
      description: API Access Key authorization header
      name: AccessKey
      in: header
    bearer:
      type: apiKey
      description: Bearer token authorization header
      name: Authorization
      in: header

````