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

# A project's insights

> Players, qualified play-hours, gets, retention, crash-free sessions and versions in use, from Patch's own play sessions, for the project's team. Qualified play-hours are input-active minutes, capped per player per game per day (`rules`). Play by the project's own team isn't counted.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{owner}/{slug}/insights
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /projects/{owner}/{slug}/insights:
    get:
      tags:
        - Insights
      summary: A project's insights
      description: >-
        Players, qualified play-hours, gets, retention, crash-free sessions and
        versions in use, from Patch's own play sessions, for the project's team.
        Qualified play-hours are input-active minutes, capped per player per
        game per day (`rules`). Play by the project's own team isn't counted.
      parameters:
        - schema:
            type: string
          required: true
          name: owner
          in: path
        - schema:
            type: string
          required: true
          name: slug
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 365
            default: 30
            description: The last this many UTC days, today included
            example: 30
          required: false
          description: The last this many UTC days, today included
          name: days
          in: query
      responses:
        '200':
          description: The project's insights
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectInsights'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    ProjectInsights:
      type: object
      properties:
        project:
          type: object
          properties:
            handle:
              type: string
            name:
              type: string
            kind:
              type:
                - string
                - 'null'
          required:
            - handle
            - name
            - kind
        period:
          type: object
          properties:
            days:
              type: integer
            from:
              type: string
            to:
              type: string
          required:
            - days
            - from
            - to
        rules:
          type: object
          properties:
            heartbeat_s:
              type: integer
            active_idle_s:
              type: integer
              description: >-
                A minute is input-active when the player's last input was less
                than this long before its heartbeat
            daily_cap_minutes:
              type: integer
              description: Qualified minutes counted per player per project per UTC day
          required:
            - heartbeat_s
            - active_idle_s
            - daily_cap_minutes
        players:
          type: integer
          description: Players who started a session
        engaged_players:
          type: integer
          description: Players with qualified play time
        new_players:
          type: integer
          description: Players whose first session on it was in the period
        new_to_patch:
          type: integer
          description: New players whose first game on Patch was this one
        sessions:
          type: integer
        qualified_minutes:
          type: integer
        qualified_hours:
          type: number
        gets:
          type: integer
          description: Players who added it to their Library for the first time
        retention:
          type: object
          properties:
            d1:
              type: object
              properties:
                cohort:
                  type: integer
                returned:
                  type: integer
              required:
                - cohort
                - returned
            d3:
              type: object
              properties:
                cohort:
                  type: integer
                returned:
                  type: integer
              required:
                - cohort
                - returned
            d7:
              type: object
              properties:
                cohort:
                  type: integer
                returned:
                  type: integer
              required:
                - cohort
                - returned
            d14:
              type: object
              properties:
                cohort:
                  type: integer
                returned:
                  type: integer
              required:
                - cohort
                - returned
            d30:
              type: object
              properties:
                cohort:
                  type: integer
                returned:
                  type: integer
              required:
                - cohort
                - returned
          required:
            - d1
            - d3
            - d7
            - d14
            - d30
          description: >-
            Of the new players whose day N after their first (UTC) is over, how
            many played on it
        crash_free:
          type: object
          properties:
            sessions:
              type: integer
              description: Sessions that ended
            crashed:
              type: integer
            rate:
              type:
                - number
                - 'null'
              description: 0 to 1; null when there's nothing to count
          required:
            - sessions
            - crashed
            - rate
        funnel:
          type: object
          properties:
            got:
              type: integer
            played:
              type: integer
            played_a_minute:
              type: integer
            came_back:
              type: integer
              description: Played on two days or more
          required:
            - got
            - played
            - played_a_minute
            - came_back
        releases:
          type: array
          items:
            type: object
            properties:
              version:
                type: string
              live:
                type: boolean
              published_at:
                type:
                  - string
                  - 'null'
              players:
                type: integer
              sessions:
                type: integer
              in_use:
                type: integer
                description: Players whose latest session was on this version
              in_use_share:
                type:
                  - number
                  - 'null'
                description: 0 to 1; null when there's nothing to count
              qualified_minutes:
                type: integer
              qualified_hours:
                type: number
              gets:
                type: integer
              crash_free:
                type:
                  - number
                  - 'null'
                description: 0 to 1; null when there's nothing to count
            required:
              - version
              - live
              - published_at
              - players
              - sessions
              - in_use
              - in_use_share
              - qualified_minutes
              - qualified_hours
              - gets
              - crash_free
        crashes:
          type: array
          items:
            type: object
            properties:
              detail:
                type:
                  - string
                  - 'null'
              version:
                type: string
              crashes:
                type: integer
            required:
              - detail
              - version
              - crashes
      required:
        - project
        - period
        - rules
        - players
        - engaged_players
        - new_players
        - new_to_patch
        - sessions
        - qualified_minutes
        - qualified_hours
        - gets
        - retention
        - crash_free
        - funnel
        - releases
        - crashes
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key (pch_...) or the token from pch login.

````

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