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

# List Leaderboard Definitions

> Lists the leaderboard definitions defined for the Title.

Allowed entity token types: title, game_server



## OpenAPI

````yaml post /Leaderboard/ListLeaderboardDefinitions
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Progression API
  description: Manage entity statistics Manage entity leaderboards
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: Leaderboards
    description: Leaderboards APIs
  - name: Statistics
    description: Statistics APIs
paths:
  /Leaderboard/ListLeaderboardDefinitions:
    post:
      tags:
        - Leaderboards
      summary: List Leaderboard Definitions
      description: |-
        Lists the leaderboard definitions defined for the Title.

        Allowed entity token types: title, game_server
      operationId: ListLeaderboardDefinitions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListLeaderboardDefinitionsRequest'
      responses:
        '200':
          $ref: '#/components/responses/ListLeaderboardDefinitionsResponse'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    ListLeaderboardDefinitionsRequest:
      type: object
      properties:
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        PageSize:
          description: The page size for the request.
          type: number
          x-actualtype: int32
        SkipToken:
          description: The skip token for the paged request.
          type: string
      example: {}
    ListLeaderboardDefinitionsResponse:
      type: object
      properties:
        LeaderboardDefinitions:
          description: List of leaderboard definitions for the title.
          type: array
          items:
            $ref: '#/components/schemas/LeaderboardDefinition'
          x-isclass: true
        PageSize:
          description: The page size on the response.
          type: number
          x-actualtype: int32
        SkipToken:
          description: The skip token for the paged response.
          type: string
      required:
        - PageSize
      example:
        LeaderboardDefinitions:
          - Name: HighestScoresByLevel
            EntityType: title_player_account
            Columns:
              - Name: Hits
            SizeLimit: 1000
            Version: 89
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
    LeaderboardDefinition:
      type: object
      properties:
        Columns:
          description: >-
            Sort direction of the leaderboard columns, cannot be changed after
            creation.
          type: array
          items:
            $ref: '#/components/schemas/LeaderboardColumn'
          x-isclass: true
        Created:
          description: Created time, in UTC
          type: string
        EntityType:
          description: >-
            The entity type being represented on the leaderboard. If it doesn't
            correspond to the PlayFab entity types, use 'external' as the type.
          type: string
        EventEmissionConfig:
          allOf:
            - $ref: '#/components/schemas/LeaderboardEventEmissionConfig'
          description: >-
            [In Preview]: The configuration for the events emitted by this
            leaderboard. If not specified, no events will be emitted.
        LastResetTime:
          description: Last time, in UTC, leaderboard version was incremented.
          type: string
        Name:
          description: A name for the leaderboard, unique per title.
          type: string
        SizeLimit:
          description: Maximum number of entries on this leaderboard
          type: number
          x-actualtype: int32
        Version:
          description: Latest Leaderboard version.
          type: number
          x-actualtype: uint32
        VersionConfiguration:
          allOf:
            - $ref: '#/components/schemas/VersionConfiguration'
          description: The version reset configuration for the leaderboard definition.
      required:
        - Name
        - EntityType
        - Columns
        - SizeLimit
        - Version
        - Created
        - VersionConfiguration
    LeaderboardColumn:
      type: object
      properties:
        LinkedStatisticColumn:
          allOf:
            - $ref: '#/components/schemas/LinkedStatisticColumn'
          description: >-
            If the value for this column is sourced from a statistic, details of
            the linked column. Null if the leaderboard is not linked.
        Name:
          description: >-
            A name for the leaderboard column, unique per leaderboard
            definition.
          type: string
        SortDirection:
          allOf:
            - $ref: '#/components/schemas/LeaderboardSortDirection'
          description: The sort direction for this column.
      required:
        - Name
        - SortDirection
    LeaderboardEventEmissionConfig:
      type: object
      properties:
        EntityRankOnVersionEndConfig:
          allOf:
            - $ref: '#/components/schemas/LeaderboardEntityRankOnVersionEndConfig'
          description: >-
            This event emits the top ranks of the leaderboard when the
            leaderboard version end.
        VersionEndConfig:
          allOf:
            - $ref: '#/components/schemas/LeaderboardVersionEndConfig'
          description: This event is emitted when the leaderboard version end.
    VersionConfiguration:
      type: object
      properties:
        MaxQueryableVersions:
          description: >-
            The maximum number of versions of this leaderboard/statistic that
            can be queried. 
          type: number
          x-actualtype: int32
        ResetInterval:
          allOf:
            - $ref: '#/components/schemas/ResetInterval'
          description: >-
            Reset interval that statistics or leaderboards will reset on. When
            using Manual intervalthe reset can only be increased by calling the
            Increase version API. When using Hour interval the resetwill occur
            at the start of the next hour UTC time. When using Day interval the
            reset will occur at thestart of the next day in UTC time. When using
            the Week interval the reset will occur at the start ofthe next
            Monday in UTC time. When using Month interval the reset will occur
            at the start of the nextmonth in UTC time.
      required:
        - ResetInterval
        - MaxQueryableVersions
    LinkedStatisticColumn:
      type: object
      properties:
        LinkedStatisticColumnName:
          description: >-
            The name of the statistic column that this leaderboard column is
            sourced from.
          type: string
        LinkedStatisticName:
          description: The name of the statistic.
          type: string
      required:
        - LinkedStatisticName
        - LinkedStatisticColumnName
    LeaderboardSortDirection:
      type: string
      enum:
        - Descending
        - Ascending
    LeaderboardEntityRankOnVersionEndConfig:
      type: object
      properties:
        EventType:
          allOf:
            - $ref: '#/components/schemas/EventType'
          description: The type of event to emit when the leaderboard version end.
        RankLimit:
          description: >-
            The maximum number of entity to return on leaderboard version end.
            Range is 1 to 1000.
          type: number
          x-actualtype: int32
      required:
        - EventType
        - RankLimit
    LeaderboardVersionEndConfig:
      type: object
      properties:
        EventType:
          allOf:
            - $ref: '#/components/schemas/EventType'
          description: The type of event to emit when the leaderboard version end.
      required:
        - EventType
    ResetInterval:
      type: string
      enum:
        - Manual
        - Hour
        - Day
        - Week
        - Month
    EventType:
      type: string
      enum:
        - None
        - Telemetry
        - PlayStream
  responses:
    ListLeaderboardDefinitionsResponse:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/ListLeaderboardDefinitionsResponse'
            example:
              code: 200
              status: OK
              data:
                LeaderboardDefinitions:
                  - Name: HighestScoresByLevel
                    EntityType: title_player_account
                    Columns:
                      - Name: Hits
                    SizeLimit: 1000
                    Version: 89
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  securitySchemes:
    EntityToken:
      type: apiKey
      in: header
      name: X-EntityToken
      description: >-
        This API requires an Entity Session Token, available from the Entity
        GetEntityToken method.

````

## Related topics

- [List Leaderboard Definitions](/api-reference/leaderboards/list-leaderboard-definitions.md)
- [PFLeaderboardsListLeaderboardDefinitionsAsync](/services/playfab/api-references/c/pfleaderboards/functions/pfleaderboardslistleaderboarddefinitionsasync.md)
- [PFLeaderboardsListLeaderboardDefinitionsResponse](/services/playfab/api-references/c/pfleaderboardstypes/structs/pfleaderboardslistleaderboarddefinitionsresponse.md)
- [PFLeaderboardsListLeaderboardDefinitionsRequest](/services/playfab/api-references/c/pfleaderboardstypes/structs/pfleaderboardslistleaderboarddefinitionsrequest.md)
- [PFLeaderboardsListLeaderboardDefinitionsGetResult](/services/playfab/api-references/c/pfleaderboards/functions/pfleaderboardslistleaderboarddefinitionsgetresult.md)
