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

# Read built-in Game activity for the last whole UTC days

> Store page views, launches, play sessions and play time for the last `days` UTC days, today included.



## OpenAPI

````yaml scripts/reference/sources/openapi/analytics.json GET /v1/management/games/{gameId}/environments/{envId}/analytics/activity
openapi: 3.1.0
info:
  title: Summer Analytics API
  version: 1.0.0
  description: >-
    Read your game's analytics: the activity overview and the catalog of events
    your game sends.
servers:
  - url: https://api.summer.games
security: []
tags:
  - name: Analytics management
    description: Developer-authorized typed analytics reads.
paths:
  /v1/management/games/{gameId}/environments/{envId}/analytics/activity:
    get:
      tags:
        - Analytics management
      summary: Read built-in Game activity for the last whole UTC days
      description: |
        Store page views, launches, play sessions and play time for the last
        `days` UTC days, today included. Every day of the window is present,
        oldest first; a day without reports is zero. collectionStart is the
        first day this Game ever received a report, or null. Requires exact
        game/environment analytics.read authorization.
      operationId: getGameActivityOverview
      parameters:
        - $ref: '#/components/parameters/GameID'
        - $ref: '#/components/parameters/EnvironmentID'
        - name: days
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 90
            default: 7
      responses:
        '200':
          description: Zero-filled daily counters and window totals.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityOverview'
        '401':
          $ref: '#/components/responses/ManagementUnauthorized'
        '404':
          $ref: '#/components/responses/ManagementNotFound'
        '422':
          $ref: '#/components/responses/ManagementInvalidQuery'
        '429':
          $ref: '#/components/responses/ManagementRateLimited'
        '503':
          $ref: '#/components/responses/ManagementUnavailable'
      security:
        - DeveloperBearer: []
components:
  parameters:
    GameID:
      name: gameId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/OpaqueID'
    EnvironmentID:
      name: envId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/OpaqueID'
  schemas:
    ActivityOverview:
      type: object
      additionalProperties: false
      required:
        - from
        - to
        - days
        - collectionStart
        - totals
        - daily
      properties:
        from:
          type: string
          format: date-time
          description: First day of the window, UTC midnight.
        to:
          type: string
          format: date-time
          description: Midnight after the last day, exclusive.
        days:
          type: integer
          minimum: 1
          maximum: 90
        collectionStart:
          type:
            - string
            - 'null'
          format: date
        totals:
          $ref: '#/components/schemas/ActivityCounts'
        daily:
          type: array
          items:
            $ref: '#/components/schemas/ActivityDay'
    OpaqueID:
      type: string
      minLength: 1
      maxLength: 256
      pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$
    ActivityCounts:
      type: object
      additionalProperties: false
      required:
        - storePageViews
        - launches
        - playSessions
        - playSeconds
      properties:
        storePageViews:
          type: integer
          minimum: 0
        launches:
          type: integer
          minimum: 0
        playSessions:
          type: integer
          minimum: 0
        playSeconds:
          type: integer
          minimum: 0
    ActivityDay:
      type: object
      additionalProperties: false
      required:
        - date
        - storePageViews
        - launches
        - playSessions
        - playSeconds
      properties:
        date:
          type: string
          format: date
        storePageViews:
          type: integer
          minimum: 0
        launches:
          type: integer
          minimum: 0
        playSessions:
          type: integer
          minimum: 0
        playSeconds:
          type: integer
          minimum: 0
    ManagementErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ManagementError'
    ManagementError:
      type: object
      additionalProperties: false
      required:
        - code
        - message
        - requestId
        - retryable
      properties:
        code:
          $ref: '#/components/schemas/ManagementErrorCode'
        message:
          type: string
        requestId:
          type: string
        retryable:
          type: boolean
    ManagementErrorCode:
      type: string
      enum:
        - not_signed_in
        - not_found
        - invalid_query
        - rate_limited
        - query_rate_limited
        - analytics_query_timeout
        - analytics_unavailable
        - unavailable
  responses:
    ManagementUnauthorized:
      description: Valid developer authentication is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ManagementErrorEnvelope'
    ManagementNotFound:
      description: Target is absent or hidden by exact-scope authorization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ManagementErrorEnvelope'
    ManagementInvalidQuery:
      description: Query parameters or typed request are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ManagementErrorEnvelope'
    ManagementRateLimited:
      description: Request or analytics query budget exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ManagementErrorEnvelope'
    ManagementUnavailable:
      description: Management or analytics query dependency unavailable or timed out.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ManagementErrorEnvelope'
  headers:
    RetryAfter:
      description: Minimum number of seconds before retrying.
      schema:
        type: string
        pattern: ^[1-9][0-9]*$
  securitySchemes:
    DeveloperBearer:
      type: http
      scheme: bearer
      bearerFormat: Summer developer access token
      description: >-
        Your Summer account token, the same one the creator management API uses
        (`summer login --store`). You can read only games you own or manage.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.