haloapi.js
Options
All
  • Public
  • Public/Protected
  • All
Menu

haloapi.js Documentation

Welcome to the haloapi.js TypeScript documentation.

This documentation is written for the haloapi.js JavaScript client, which consumes the Halo 5 Developer's API.

However, this documentation provides much information on the structure of responses provided by the API. Explanations for fields, for instance, are taken directly from the sample schemas provided on developer.haloapi.com.

Ensure that the Only exported checkbox in the top-right corner is unchecked, so you can see the entire structure in the panel on the left.

TODO

  • Currently the documentation is around 85% complete. The service record and post-game carnage reports have yet to be modelled in TypeScript.

  • Fill in file (dynamic module?) level documentation.

Index

External modules

"haloapi.d"

"haloapi.d":

"haloapi"

"haloapi":

The TypeScript module to export a Node JS module.

CacheAdapter

CacheAdapter:

Adapters to various supported caches.

delete

  • delete(key: string): Promise<number>
  • delete(keys: string[]): Promise<number>
  • Delete a key

    Parameters

    • key: string

    Returns Promise<number>

    A promise to be fulfilled when the key is deleted.

  • Delete a set of keys.

    Parameters

    • keys: string[]

    Returns Promise<number>

    A promise to be fulfilled when the key is deleted.

get

  • get<T>(key: string): Promise<T>
  • Get an item to the cache with a specified key.

    Type parameters

    • T

      The type of the value.

    Parameters

    • key: string

      The specified key.

    Returns Promise<T>

    A promise resolving to the value, or a rejection on cache miss.

keys

  • keys(pattern: string): Promise<string[]>
  • Retrieve all keys matching a pattern.

    Parameters

    • pattern: string

      a key to search the cache with.

    Returns Promise<string[]>

    A promise resolving to a list of keys.

set

  • set<T>(key: string, value: T): Promise<void>
  • Set an intem in the cache with a specified key.

    Type parameters

    • T

      The type of value

    Parameters

    • key: string

      The specified key.

    • value: T

      The value to store.

    Returns Promise<void>

CacheAdapterClass

CacheAdapterClass:

constructor

HaloAPIClass

HaloAPIClass:

constructor

IHaloAPI

IHaloAPI:

The root HaloAPI interface. Provides access to endpoint services, and optional caching support.

metadata

metadata: IMetadata

Access metadata endpoints

profile

profile: IProfile

Access profile endpoints

stats

stats: IStats

Access stats endpoints

cacheClear

  • cacheClear(): Promise<number>
  • Clear the cache. If no cache is in use this will instantly reject.

    Returns Promise<number>

    A promise to be fulfilled when the case is cleared, or rejected of an error occurs or no items were cleared.

getImageURL

  • getImageURL(endpoint: string): Promise<url>
  • Asynchronously retreive the location header from the Halo API.

    Parameters

    • endpoint: string

      The endpoint path (not including host) to request.

    Returns Promise<url>

getJSON

  • getJSON<T>(endpoint: string, bypassCache?: boolean): Promise<T>
  • Asynchronously retreive an endpoint from the Halo API.

    Type parameters

    • T

      The type of the argument passed on promise fulfillment

    Parameters

    • endpoint: string

      The endpoint path (not including host) to request.

    • Optional bypassCache: boolean

    Returns Promise<T>

isGuid

  • isGuid(id: guid): boolean
  • Ensures that a guid is roughly in the shape of a guid. Only checks that the characters are correct. Does not validate length. Bi-product is that all ids that return true do not need to be encoded in a URL component.

    Parameters

    Returns boolean

jsonSchema

  • jsonSchema(endpointFn: Function): object
  • Provide this function with an endpoint function from this api, such as api.metadata.commendations, and it will provide a schema for the expected successful response.

    Parameters

    • endpointFn: Function

      the function which which to retrieve a schema.

    Returns object

    a JSON Schema for a particular endpoint.

SupportedCaches

SupportedCaches:

An object whose keys are the names of cache systems, and values are the classes to be constructed to adapt the cache system.

guid

guid: string

Declare some simple aliases for semantic purposes

url

url: string

"index"

"index":

CacheManager

CacheManager:

constructor

  • new CacheManager(name: string, options: any): CacheManager

adapter

adapter: CacheAdapter

name

name: string

options

options: any

cacheClear

  • cacheClear(): Promise<any>

cacheGet

  • cacheGet<T>(uri: string): Promise<T>
  • inheritdoc

    Type parameters

    • T

    Parameters

    • uri: string

    Returns Promise<T>

cacheSet

  • cacheSet<T>(uri: string, item: T): void
  • inheritdoc

    Type parameters

    • T

    Parameters

    • uri: string
    • item: T

    Returns void

HaloAPI

HaloAPI:

constructor

apiKey

apiKey: string

cacheManager

cacheManager: CacheManager

cacheName

cacheName: string

host

host: string

metadata

metadata: IMetadata

Access metadata endpoints

profile

profile: IProfile

Access profile endpoints

stats

stats: IStats

Access stats endpoints

title

title: string

cacheClear

  • cacheClear(): Promise<number>
  • Clear the cache. If no cache is in use this will instantly reject.

    Returns Promise<number>

    A promise to be fulfilled when the case is cleared, or rejected of an error occurs or no items were cleared.

duplicateRequest

  • duplicateRequest<T>(message: any, endpoint: string, isJSON: boolean): Promise<T>
  • Type parameters

    • T

    Parameters

    • message: any
    • endpoint: string
    • isJSON: boolean

    Returns Promise<T>

getImageURL

  • getImageURL(endpoint: string): Promise<url>
  • Asynchronously retreive the location header from the Halo API.

    Parameters

    • endpoint: string

    Returns Promise<url>

getJSON

  • getJSON<T>(endpoint: string, bypassCache?: boolean): Promise<T>
  • Asynchronously retreive an endpoint from the Halo API.

    Type parameters

    • T

    Parameters

    • endpoint: string
    • Optional bypassCache: boolean

    Returns Promise<T>

handleRequestRejection

  • handleRequestRejection<T>(endpoint: string, error: any, isJSON: boolean): Promise<T>
  • Type parameters

    • T

    Parameters

    • endpoint: string
    • error: any
    • isJSON: boolean

    Returns Promise<T>

isGuid

  • isGuid(id: guid): boolean
  • Ensures that a guid is roughly in the shape of a guid. Only checks that the characters are correct. Does not validate length. Bi-product is that all ids that return true do not need to be encoded in a URL component.

    Parameters

    Returns boolean

jsonSchema

  • jsonSchema(endpointFn: any): object
  • inheritdoc

    Parameters

    • endpointFn: any

    Returns object

RedisCache

RedisCache:

Redis cache adapter.

todo

Pull this out to a seperate directory.

constructor

options

options: any

redis

redis: any

redisClient

redisClient: any

delete

  • delete(param: any): Promise<number>
  • inheritdoc

    Parameters

    • param: any

    Returns Promise<number>

get

  • get<T>(key: string): Promise<T>
  • Get an item to the cache with a specified key.

    Type parameters

    • T

    Parameters

    • key: string

    Returns Promise<T>

    A promise resolving to the value, or a rejection on cache miss.

keys

  • keys(pattern: string): Promise<string[]>
  • Retrieve all keys matching a pattern.

    Parameters

    • pattern: string

    Returns Promise<string[]>

    A promise resolving to a list of keys.

set

  • set<T>(key: string, value: T): Promise<void>
  • Set an intem in the cache with a specified key.

    Type parameters

    • T

    Parameters

    • key: string
    • value: T

    Returns Promise<void>

HaloAPIOptions

HaloAPIOptions:
param

Your API key. API keys are obtained from http://developer.haloapi.com/

param

The title of the game for this API instance. Currently only "h5" (Halo 5: Guardians) is supported.

param

The caching layer. Default is null, for no caching, current supported options: "redis"

param

the options object or argument list passed to the caching client. For redis this can be omitted, or, e.g. [ 'redis://user:pass@host:port', options ].

apiKey

apiKey: string

cache

cache: string

cacheOptions

cacheOptions: any

title

title: string

CacheAdapters

CacheAdapters: SupportedCaches

DEBUG

DEBUG: boolean

codependency

codependency: any

requireOptional

requireOptional: any

"metadata"

"metadata":

Metadata

Metadata:

constructor

api

title

title: string

campaignMissions

commendations

csrDesignations

enemies

flexibleStats

gameBaseVariants

gameVariantById

impulses

mapVariantById

maps

  • maps(): Promise<Maps>

medals

playlists

requisitionById

requisitionPackById

requisitionPacksPurchasable

seasons

skulls

spartanRanks

teamColors

vehicles

weapons

"metadata/CSRDesignations.d"

"metadata/CSRDesignations.d":

CSRDesignation

CSRDesignation:

bannerImageUrl

bannerImageUrl: url

An image to use as the background for the designation.

id

id: number

An ID that identifies the designation. It happens to be the same as the designation ordering. This value is the same across all languages. Note that Id = 0 indicates the player has an "Unranked" designation. The player must complete additional matches before being assigned an official CSR designation.

name

name: string

A localized name for the designation, suitable for display to users. The text is title cased.

tiers

tiers: CSRTier[]

An array of "CSR Tier" entries, one for each tier this designation supports. Semi-Pro and Pro will not have tiers defined, and this list will be empty.

CSRTier

CSRTier:

iconImageUrl

iconImageUrl: url

An image to use as the icon for th tier.

id

id: number

An ID that identifies the tier.

CSRDesignations

CSRDesignations: CSRDesignation[]

A list of CSR designations for the title. CSR stands for Competitive Skill Rank. CSR is organized into a series of designations, each with a set of tiers within the designation. The designations are: Iron, Bronze, Silver, Gold, Onyx, and Pro. Within each designation are tiers, for example, Bronze 1, Bronze 2, Bronze 3, etc. The Pro designation is special. It has only one tier. For Pro players, we show users a ranking value instead of the tier indicator. For non-Pro players, we keep the absolute skill ranking hidden and show the CSR tier. To determine what CSR a player has earned, view the Service Record stats for that player. There is no significance to the ordering.

"metadata/CampaignMissions.d"

"metadata/CampaignMissions.d":

CampaignMission

CampaignMission:

description

description: string

A localized description, suitable for display to users.

id

id: guid

The ID that uniquely identifies this campaign mission.

imageUrl

imageUrl: url

An image that is used as the background art for this mission.

missionNumber

missionNumber: number

The order of the mission in the story. The first mission is #1.

name

name: string

A localized name suitable for display.

type

type: string

The team for the mission. One of the following values:

  • BlueTeam
  • OsirisTeam

CampaignMissions

CampaignMissions: CampaignMission[]

A listing of campaign missions supported in the title. There is no significance to the ordering.

"metadata/Commendations.d"

"metadata/Commendations.d":

Commendation

Commendation:

category

Information about how this commendation should be categorized when shown to users.

description

description: string

A localized description, suitable for display to users.

enabled

enabled: boolean

Whether this commendation is enabled or not.

iconImageUrl

iconImageUrl: url

An image that is used as the icon for this commendation.

id

id: guid

The ID that uniquely identifies this commendation.

levels

One or more levels that model what a player must do to earn rewards and complete the commendation.

name

name: string

A localized name for the commendation, suitable for display to users. The text is title cased.

requiredLevels

requiredLevels: CommendationRequiredLevel[]

For meta commendations, the commendation is considered "completed" when all required levels have been "completed". This list contains one or more Level Ids from other commendations. For progressive commendations, this list is empty.

reward

The reward the player will receive for earning this commendation.

type

type: string

Indicates the type of commendation. This is one of the two following options:

  • "Progressive"
  • "Meta" Progressive commendations have a series of increasingly difficult thresholds (levels) a player must cross to receive increasingly greater rewards. Meta commendations are unlocked when a player has completed one or more other commendation levels. We model this by giving meta commendations one level with dependencies rather than a threshold.

CommendationCategory

CommendationCategory:

iconImageUrl

iconImageUrl: url

An image that is used as the icon for this category.

id

id: guid

The ID that uniquely identifies this category.

name

name: string

title cased.

CommendationLevel

CommendationLevel:

id

id: guid

The ID that uniquely identifies this commendation level.

reward

The reward the player will receive for earning this level.

threshold

threshold: number

For progressive commendations this indicates the threshold that the player must meet or exceed to consider the commendation level "completed". For meta commendations, this value is always zero.

CommendationMetRequirement

CommendationMetRequirement:

The progress the player had made towards the commendation level before the match. In C#, this can be reassembled into a Guid in the following manner:
new Guid((int)Data1, (short)Data2, (short)Data3, BitConverter.GetBytes((long)Data4)).

Data1

Data1: number

Data2

Data2: number

Data3

Data3: number

Data4

Data4: number

CommendationRequiredLevel

CommendationRequiredLevel:

id

id: guid

The ID of the commendation level that must be met in order to consider the level requirement met.

threshold

threshold: number

The threshold that the player must meet or exceed in order to consider the level requirement met.

CommendationReward

CommendationReward:

id

id: guid

The ID that uniquely identifies this reward.

requisitionPacks

requisitionPacks: RequisitionPack[]

The set of requisition packs (if any) that will be awarded.

xp

xp: number

The amount of XP that will be awarded.

MetaCommendationDelta

MetaCommendationDelta:

Id

Id: guid

The commendation ID. Commendations are available via the Metadata API.

MetRequirements

MetRequirements: CommendationMetRequirement[]

The progress the player had made towards the commendation level after the match.

PreviousMetRequirements

PreviousMetRequirements: CommendationMetRequirement[]

The progress the player had made towards the commendation level before the match.

ProgressiveCommendationDelta

ProgressiveCommendationDelta:

Id

Id: guid

The commendation ID. Commendations are available via the Metadata API.

PreviousProgress

PreviousProgress: number

The progress the player had made towards the commendation level before the match.

Progress

Progress: number

The progress the player had made towards the commendation level after the match.

Commendations

Commendations: Commendation[]

A list of commendations for the title. There is no significance to the ordering.

"metadata/Enemies.d"

"metadata/Enemies.d":

Enemy

Enemy:

description

description: string

A localized description, suitable for display to users. Note: This may be null.

faction

faction: string

The faction that this enemy is affiliated with. One of the following options:

  • UNSC
  • Covenant
  • Promethean

id

id: number

The ID that uniquely identifies this enemy.

lageIconImageUrl

lageIconImageUrl: url

A reference to a large image for icon use. This may be null if there is no image defined.

name

name: string

A localized name for the object, suitable for display to users. The text is title cased.

smallIconImageUrl

smallIconImageUrl: url

A reference to a small image for icon use. This may be null if there is no image defined.

Enemies

Enemies: Enemy[]

A list of enemies for the title. There is no significance to the ordering.

"metadata/FlexibleStats.d"

"metadata/FlexibleStats.d":

FlexibleStat

FlexibleStat:

id

id: guid

The ID that uniquely identifies this stat.

name

name: string

A localized name for the data point, suitable for display to users. The text is title cased.

type

type: string

The type of stat this represents, it is one of the following options:

  • Count
  • Duration

FlexibleStats

FlexibleStats: FlexibleStat[]

A list of defined flexible stat entries for the title. There is no significance to the ordering.

"metadata/GameBaseVariants.d"

"metadata/GameBaseVariants.d":

GameBaseVariant

GameBaseVariant:

iconUrl

iconUrl: string

An image to use as the game base variant for the designation.

id

id: guid

The ID that uniquely identifies this game base variant.

name

name: string

A localized name for the game base variant, suitable for display to users. The text is title cased.

numberernalName

numberernalName: string

Internal use. The numberernal non-localized name for the the game base variant.

supportedGameModes

supportedGameModes: string[]

A list that indicates what game modes this base variant is available within. Options are:

  • Arena
  • Campaign
  • Custom
  • Warzone

GameBaseVariants

GameBaseVariants: GameBaseVariant[]

A list of game base variants for the title. There is no mechanism to determine which game base variants are currently available for play. To determine which game base variants a specific player has played, view the Service Record stats for that player.There is no significance to the ordering.

"metadata/GameVariant.d"

"metadata/GameVariant.d":

GameVariant

GameVariant:

description

description: string

A localized description, suitable for display to users.

gameBaseVariantId

gameBaseVariantId: guid

The ID of the game base variant this is a variant for. Game Base Variants are available via the Metadata API.

iconUrl

iconUrl: string

An icon image for the game variant.

id

id: guid

The ID that uniquely identifies this game variant.

name

name: string

A localized name, suitable for display to users.

"metadata/Impulses.d"

"metadata/Impulses.d":

Impulse

Impulse:

id

id: number

The ID that uniquely identifies this impulse.

internalName

internalName: string

Internal use. The non-localized name of the impulse.

Impulses

Impulses: Impulse[]

A list of impulses (essentially invisible medals) for the title. There is no significance to the ordering.

"metadata/MapVariant.d"

"metadata/MapVariant.d":

MapVariant

MapVariant:

description

description: string

A localized description, suitable for display to users.

id

id: guid

The ID that uniquely identifies this map variant.

mapId

mapId: guid

The ID of the map this is a variant for. Maps are available via the Metadata API.

mapImageUrl

mapImageUrl: string

A reference to an image. This may be null if there is no image defined.

name

name: string

A localized name, suitable for display to users.

"metadata/Maps.d"

"metadata/Maps.d":

BaseMap

BaseMap:

description

description: string

A localized description, suitable for display to users.

id

id: guid

The ID that uniquely identifies this map.

imageUrl

imageUrl: string

A reference to an image. This may be null if there is no image defined.

name

name: string

A localized name, suitable for display to users.

supportedGameModes

supportedGameModes: string[]

This lists all the game modes to which this map is available. Options are:

  • Arena
  • Campaign
  • Custom
  • Warzone

Maps

Maps: BaseMap[]

A list of maps for the title. There is no significance to the ordering.

"metadata/Medals.d"

"metadata/Medals.d":

Medal

Medal:

classification

classification: string

The type of this medal. It will be one of the following options:

  • Unknown
  • Multi-kill
  • Spree
  • Style
  • Vehicle
  • Breakout
  • Objective

description

description: string

A localized description, suitable for display to users.

difficulty

difficulty: number

The anticipated difficulty, relative to all other medals of this classification. The difficulty is ordered from easiest to most difficult.

id

id: number

The ID that uniquely identifies this map medal.

name

name: string

A localized name for the medal, suitable for display to users.

spriteLocation

spriteLocation: SpriteLocation

The location on the sprite sheet for the medal.

SpriteLocation

SpriteLocation:

height

height: number

The height of the full sprite sheet (in pixels). The dimensions of the full sheet are included so that the sheet can be resized.

left

left: number

The X coordinate where the top-left corner of the sprite is located.

spriteHeight

spriteHeight: number

The height of this sprite (in pixels).

spriteSheetUri

spriteSheetUri: string

A reference to an image that contains all the sprites.

spriteWidth

spriteWidth: number

The width of this sprite (in pixels).

top

top: number

The Y coordinate where the top-left corner of the sprite is located.

width

width: number

The width of the full sprite sheet (in pixels). The dimensions of the full sheet are included so that the sheet can be resized.

Medals

Medals: Medal[]

A list of medals for the title. There is no significance to the ordering.

"metadata/Playlists.d"

"metadata/Playlists.d":

Playlist

Playlist:

description

description: string

A localized description for the playlist, suitable for display to users.

gameMode

gameMode: string

The game mode played in this playlist. Options are:

  • Arena
  • Campaign
  • Custom
  • Warzone

id

id: guid

The ID that uniquely identifies this playlist.

imageUrl

imageUrl: string

An image used to illustrate this playlist.

isActive

isActive: boolean

Indicates if this playlist is currently available for play.

isRanked

isRanked: boolean

Indicates if a CSR (competitive skill rank) is shown for players who participate in this playlist.

name

name: string

A localized name for the playlist, suitable for display to users. The text is title cased.

Playlists

Playlists: Playlist[]

A list of playlists for the title. To determine which playlists a specific player has played within, view the Service Record stats for that player. There is no significance to the ordering.

"metadata/Requisition.d"

"metadata/Requisition.d":

Requistion

Requistion:

categoryName

categoryName: string

A localized name for the category of the requisition, suitable for display to users. The text is title cased.

certificationRequisitionId

certificationRequisitionId: guid

If this is set, this is the ID of the Certification Requisition that is required to earn this requisition.

creditsAwarded

creditsAwarded: number

For requisitions where the useType is CreditGranting, this field indicates how many credits the player is rewarded with. When the requisition is not CreditGranting, this value is zero.

description

description: string

A localized description, suitable for display to users.

id

id: guid

The ID that uniquely identifies this requisition.

internalCategoryName

internalCategoryName: string

Internal use. A non-localized name for the category of the requisition.

isCertification

isCertification: boolean

Indicates if this item is a Certification. Certifications will always be durable and are required to earn certain other requisitions.

isMythic

isMythic: boolean

Indicates if this requisition has been flagged as having 'mythic status'.

isWearable

isWearable: boolean

Indicates whether the requisition is wearable.

largeImageUrl

largeImageUrl: string

A reference to a large image for icon use. This may be null if there is no image defined.

levelRequirement

levelRequirement: number

The Spartan Rank required in order to use the requisition.

mediumImageUrl

mediumImageUrl: string

A reference to a medium image for icon use. This may be null if there is no image defined.

name

name: string

A localized name, suitable for display to users. The text is title cased.

rarity

rarity: string

The localized rarity suitable for display to users. Indicates the scarcity and thus rarity of the requisition

rarityType

rarityType: string

The non-localized rarity. Indicates the scarcity and thus rarity of the requisition. The options are (in increasing order of rarity):

  • Common
  • Uncommon
  • Rare
  • UltraRare
  • Legendary

sellPrice

sellPrice: number

This field indicates how many credits the player will receive if they wish to discard this requisition. When SellPrice is zero, the card cannot be sold back for credits.

smallImageUrl

smallImageUrl: string

A reference to a small image for icon use. This may be null if there is no image defined.

subcategoryName

subcategoryName: string

A localized name for the sub-category of the requisition, suitable for display to users. The text is title cased.

subcategoryOrder

subcategoryOrder: number

The order of the subcategory in the category.

supportedGameModes

supportedGameModes: string[]

This lists all the game modes that this requisition is redeemable in. Options are:

  • Arena
  • Campaign
  • Custom
  • Warzone

useType

useType: string

Indicates how the requisition card may be used. Options are:

  • Consumable: The requisition can be called in and used while in-game. When players call in a consumable requisition it is removed from the players inventory.
  • Durable: The requisition is not usable in-game. Players can only earn one of each durable requisition and it is used to model awards such as armor suits, helmets, emblems or other items such as stickers. Durables are never removed from the player inventory.
  • Boost: The requisition is used prior to a match beginning and will modify how many XP or Credits the player will earn at the end of the match. When put into effect, it is removed from the player inventory.
  • CreditGranting: When obtained, the requisition will grant the player some amount of credits. Once the credits are granted the requisition is immediately removed from the player inventory.

"metadata/RequisitionPacks.d"

"metadata/RequisitionPacks.d":

RequisitionPack

RequisitionPack:

creditPrice

creditPrice: number

If the pack is purchasable via credits, this value contains the number of credits a player must spend to acquire one pack. This value is zero when isPurchasableWithCredits is false.

description

description: string

A localized description, suitable for display to users.

flair

flair: string

Internal use. Indicates the visual treatment of the pack. This is one of the following options:

  • None
  • New
  • Hot
  • LeavingSoon
  • MaximumValue
  • Limitedtime
  • Featured
  • BestSeller
  • Popular

id

id: guid

The ID that uniquely identifies this pack.

isFeatured

isFeatured: boolean

Internal use. Whether the item should be featured ahead of others.

isNew

isNew: boolean

Internal use. Whether the item should be labeled as "new!"

isPurchasableFromMarketplace

isPurchasableFromMarketplace: boolean

If the pack might be obtainable through the Xbox Live Marketplace, then this value is true.

isPurchasableWithCredits

isPurchasableWithCredits: boolean

If the pack is currently available for purchase by spending credits, then this value is true.

largeImageUrl

largeImageUrl: url

A large image for the pack.

mediumImageUrl

mediumImageUrl: url

A medium image for the pack.

merchandisingOrder

merchandisingOrder: number

Internal use. The order in which packs are shown for merchandising purposes.

name

name: string

A localized name for the pack, suitable for display to users. The text is title cased.

smallImageUrl

smallImageUrl: url

A small image for the pack.

xboxMarketplaceProductId

xboxMarketplaceProductId: guid

If this pack might be obtainable through the Xbox Live Marketplace, this is the product ID.

note

Pricing and availability within the Xbox Live marketplace is controlled independently of this value. The presence of an Id in this field is not a guarantee the product is purchasable. There may be geographic restrictions restricting purchase in certain regions, or the item may not be currently purchasable at all.

xboxMarketplaceProductUrl

xboxMarketplaceProductUrl: url

If this pack might be obtainable through the Xbox Live Marketplace, this is the URL to the product.

RequisitionPacks

RequisitionPacks: RequisitionPack[]

A list of requisition packs

"metadata/Seasons.d"

"metadata/Seasons.d":

Season

Season:

endDate

endDate: string

The end date and time of this season. This is expressed as an ISO 8601 combined Date and Time.

iconUrl

iconUrl: string

An icon used to represent this season.

id

id: guid

The ID that uniquely identifies this season.

isActive

isActive: boolean

Indicates if this season is currently active.

name

name: string

A localized name for the season, suitable for display to users.

playlists

playlists: Playlist[]

One or more playlists that are available in this season.

startDate

startDate: string

The start date and time of this season. This is expressed as an ISO 8601 combined Date and Time.

Seasons

Seasons: Season[]

"metadata/Skulls.d"

"metadata/Skulls.d":

Skull

Skull:

description

description: string

A localized description, suitable for display to users.

id

id: number

The ID that uniquely identifies this skull.

missionId

missionId: guid

Indicates what mission this skull can be located within. Null when the skull is not found in a mission. Missions are available via the Metadata API.

name

name: string

A localized name, suitable for display to users. The text is title cased.

Skulls

Skulls: Skull[]

A list of skulls for the title. There is no significance to the ordering.

"metadata/SpartanRanks.d"

"metadata/SpartanRanks.d":

SpartanRank

SpartanRank:

id

id: number

The ID that uniquely identifies this Spartan Rank.

reward

The reward the player will receive for earning this Spartan Rank.

startXp

startXp: number

The amount of XP required to enter this rank.

SpartanRankReward

SpartanRankReward:

id

id: guid

The ID that uniquely identifies this reward.

requisitionPacks

requisitionPacks: RequisitionPack[]

The set of requisition packs (if any) that will be awarded.

xp

xp: number

The amount of XP that will be awarded.

SpartanRanks

SpartanRanks: SpartanRank[]

List of spartan ranks

"metadata/TeamColors.d"

"metadata/TeamColors.d":

TeamColor

TeamColor:

color

color: string

A seven-character string representing the team color in RGB Hex notation. This notation uses a # followed by a hex triplet.

description

description: string

A localized description, suitable for display to users.

iconUrl

iconUrl: string

A reference to an image for icon use. This may be null if there is no image defined.

id

id: number

The ID that uniquely identifies this color. This will be the same as the team's ID in responses from the Stats API.

name

name: string

A localized name, suitable for display to users.

TeamColors

TeamColors: TeamColor[]

A listing of team colors supported in the title. There is no significance to the ordering.

"metadata/Vehicles.d"

"metadata/Vehicles.d":

Vehicle

Vehicle:

description

description: string

A localized description, suitable for display to users.

id

id: number

The ID that uniquely identifies this vehicle.

isUsableByPlayer

isUsableByPlayer: boolean

Indicates whether the vehicle is usable by a player.

largeIconImageUrl

largeIconImageUrl: string

A reference to a large image for icon use. This may be null if there is no image defined.

name

name: string

A localized name for the object, suitable for display to users. The text is title cased.

smallIconImageUrl

smallIconImageUrl: string

A reference to a small image for icon use. This may be null if there is no image defined.

Vehicles

Vehicles: Vehicle[]

A list of vehicles for the title. There is no significance to the ordering.

"metadata/Weapons.d"

"metadata/Weapons.d":

Weapon

Weapon:

description

description: string

A localized description, suitable for display to users.

id

id: number

The ID that uniquely identifies the weapon.

isUsableByPlayer

isUsableByPlayer: boolean

Indicates whether the weapon is usable by a player.

largeIconImageUrl

largeIconImageUrl: string

A reference to a large image for icon use. This may be null if there is no image defined.

name

name: string

A localized name for the object, suitable for display to users. The text is title cased.

smallIconImageUrl

smallIconImageUrl: string

A reference to a small image for icon use. This may be null if there is no image defined.

type

type: string

The type of the vehicle. Options are:

  • Grenade
  • Turret
  • Vehicle
  • Standard
  • Power

Weapons

Weapons: Weapon[]

A listing of weapons supported in the title. There is no significance to the ordering.

"metadata/index.d"

"metadata/index.d":

IMetadata

IMetadata:

campaignMissions

commendations

csrDesignations

enemies

flexibleStats

gameBaseVariants

gameVariantById

impulses

mapVariantById

maps

  • maps(): Promise<Maps>

medals

playlists

requisitionById

requisitionPackById

requisitionPacksPurchasable

seasons

skulls

spartanRanks

teamColors

vehicles

weapons

"profile"

"profile":

Profile

Profile:

constructor

api

title

title: string

constructQs

emblemImage

spartanImage

"profile/EmblemImage.d"

"profile/EmblemImage.d":

EmblemImage

EmblemImage: url

The URL of an image of the player's emblem

"profile/SpartanImage.d"

"profile/SpartanImage.d":

SpartanImage

SpartanImage: url

The URL of the player's Spartan Image

"profile/index.d"

"profile/index.d":

IProfile

IProfile:

emblemImage

spartanImage

IProfileParams

IProfileParams:

crop

crop: string

An optional crop that will be used to determine what portion of the Spartan is returned in the image. The value must be either "full" or "portrait". If no value is specified "full" is used. If an unsupported value is provided, the API returns HTTP 400 ("Bad Request").

note

Only available for the Spartan Image endpoint

player

player: string

size

size: number

An optional size (specified in pixels) of the image requested. When specified, this value must be one of the following values: 95, 128, 190, 256, 512. These values should be kept in service config so adjustments can be made later if necessary. If a value is specified that is not in this list, the API returns HTTP 400 ("Bad Request"). If the size is empty or missing, the API will use 256.

"stats"

"stats":

Stats

Stats:

constructor

api

title

title: string

arenaMatchById

campaignMatchById

  • campaignMatchById(id: guid): Promise<any>

customMatchById

  • customMatchById(id: guid): Promise<any>

events

playerMatches

serviceRecord

  • serviceRecord<T>(gameMode: string, player: string): Promise<T>
  • Type parameters

    • T

    Parameters

    • gameMode: string
    • player: string

    Returns Promise<T>

serviceRecordArena

  • serviceRecordArena(player: string): Promise<any>

serviceRecordCampaign

  • serviceRecordCampaign(player: string): Promise<any>

serviceRecordCustom

  • serviceRecordCustom(player: string): Promise<any>

serviceRecordWarzone

  • serviceRecordWarzone(player: string): Promise<any>

serviceRecords

  • serviceRecords<T>(gameMode: string, players: string[]): Promise<T>
  • Type parameters

    • T

    Parameters

    • gameMode: string
    • players: string[]

    Returns Promise<T>

serviceRecordsArena

  • serviceRecordsArena(players: string[]): Promise<any>

serviceRecordsCampaign

  • serviceRecordsCampaign(players: string[]): Promise<any>

serviceRecordsCustom

  • serviceRecordsCustom(players: string[]): Promise<any>

serviceRecordsWarzone

  • serviceRecordsWarzone(players: string[]): Promise<any>

warzoneMatchById

"stats/MatchEvents.d"

"stats/MatchEvents.d":

GameEvent

GameEvent:

Assistants

Assistants: Player[]

The gamertags of players who contributed to a kill.

DeathDisposition

DeathDisposition: number

The disposition of the death. Can be one of the following: Friendly = 0, Hostile = 1, Neutral = 2

EventName

EventName: string

Descriptor to determine what fields will be filled in for the event. This list will grow over time as more events are exposed. Can be one of the following: Death - An event that is created when a death occurs in the match.

IsAssassination

IsAssassination: boolean

Describes if the death was committed by the killer from behind (Assassination or melee to back).

IsGroundPound

IsGroundPound: boolean

Describes if the kill was committed by the killer with a ground pound.

IsHeadshot

IsHeadshot: boolean

Describes if the kill was committed by the killer with a head shot.

IsMelee

IsMelee: boolean

Describes if the kill was committed by the killer using melee.

IsShoulderBash

IsShoulderBash: boolean

Describes if the kill was committed by the killer with a shoulder bash.

IsWeapon

IsWeapon: boolean

Describes if the kill was committed by the killer with a weapon.

Killer

Killer: Player

Describes the killer's information. Can be null if killer is not a player in the game.

KillerAgent

KillerAgent: number

The type of killer that caused the death. Can be one of the following: None = 0, Player = 1, AI = 2

KillerWeaponAttachmentIds

KillerWeaponAttachmentIds: number[]

Any attachments the killer's weapon had.

KillerWeaponStockId

KillerWeaponStockId: number

The ID of the weapon. Weapons are available via the Metadata API.

KillerWorldLocation

KillerWorldLocation: WorldLocation

Object describing the position of the killer on the map when they made the kill.

TimeSinceStart

TimeSinceStart: string

Time passed since the start of the match when the event occurred. This is expressed as an ISO 8601 Duration.

Victim

Victim: Player

Describes the victim's information. Can be null if victim is not a player in the game

VictimAgent

VictimAgent: number

The type of victim who was killed. Can be one of the following: None = 0, Player = 1, AI = 2

VictimAttachmentIds

VictimAttachmentIds: number[]

Any attachments the victim's weapon had.

VictimStockId

VictimStockId: number

The ID of the weapon. Weapons are available via the Metadata API.

VictimWorldLocation

VictimWorldLocation: WorldLocation

Object describing the position of the victim on the map when they were killed.

MatchEvents

MatchEvents:

GameEvents

GameEvents: GameEvent[]

An ordered list of events that describe a match from start to completion. Events can be a variety of types which will influence what fields are filled in.

IsCompleteSetOfEvents

IsCompleteSetOfEvents: boolean

As this is an experimental API it has no guarantees around its accuracy. However we do try our best to ensure all events are valid and accounted for. If they do not match up to our expectations this field will return as false indicating this may not be the full set of events that occurred in game.

Player

Player:

Gamertag

Gamertag: string

The player's gamertag.

WorldLocation

WorldLocation:

x

x: number

The x co-ordinate

y

y: number

The y co-ordinate

z

z: number

The z co-ordinate

"stats/PGCRArena.d"

"stats/PGCRArena.d":

CsrState

CsrState:

Csr

Csr: number

The CSR value. Zero for normal designations.

DesignationId

DesignationId: number

The Designation of the CSR. Options are:

  • 1 through 5: Normal designations
  • 6 and 7: Semi-pro and Pro respectively

PercentToNextTier

PercentToNextTier: number

The percentage of progress towards the next CSR tier.

Rank

Rank: number

If the CSR is Semi-pro or Pro, the player's leaderboard ranking.

Tier

Tier: number

The CSR tier.

EnemyKill

EnemyKill:

Enemy

Enemy: object

The enemy this entry references

Type declaration

  • Attachments: number[]

    The attachments (variants) for the enemy.

  • BaseId: number

    The Base ID for the enemy.

TotalKills

TotalKills: number

Total number of kills on the enemy by the player

ImpulseCount

ImpulseCount:

Count

Count: number

The number of times the Impuse was earned.

Id

Id: number

The ID of the Impulse. Impulses are available via the Metadata API.

MedalAward

MedalAward:

Count

Count: number

The number of times the Medal was earned.

MedalId

MedalId: number

The ID of the Medal. Medals are available via the Metadata API.

OpponentDetails

OpponentDetails:

GamerTag

GamerTag: string

The gamertag of the opponent that killed the player.

TotalKills

TotalKills: number

The number of times the opponent killed the player.

PGCRArena

PGCRArena:

GameBaseVariantId

GameBaseVariantId: guid

The ID of the game base variant for this match. Game base variants are available via the Metadata API.

GameVariantId

GameVariantId: guid

The variant of the game for this match. Game variants are available via the Metadata API.

IsMatchOver

IsMatchOver: boolean

the match is in-progress, but the behavior for incomplete matches in undefined.

IsTeamGame

IsTeamGame: boolean

Whether this was a team-based game or not.

MapId

MapId: guid

The ID of the base map for this match. Maps are available via the Metadata API.

MapVariantId

MapVariantId: guid

The variant of the map for this match. Map variants are available via the Metadata API.

PlayerStats

PlayerStats: PlayerStat[]

A list of stats for each player who was present in the match.

PlaylistId

PlaylistId: guid

The playlist ID of the match. Playlists are available via the Metadata API.

TeamStats

TeamStats: TeamStat[]

A list of stats for each team who in the match. Note that in Free For All modes, there is an entry for every player.

TotalDuration

TotalDuration: string

The length of the match. This is expressed as an ISO 8601 Duration.

PlayerStat

PlayerStat:

AvgLifeTimeOfPlayer

AvgLifeTimeOfPlayer: string

The player's average lifetime.

CreditsEarned

CreditsEarned: object

Details on any credits the player may have earned from playing this match.

Type declaration

  • BoostAmount: number

    The portion of credits earned due to the boost card the user applied

  • PlayerRankAmount: number

    The portion of credits earned due to the player's team-agnostic rank in the match.

  • Result: number

    Indicates how the credits result was arrived at. Options are:

    • Credits Disabled In Playlist = 0, TotalCreditsEarned is zero because this playlist has credits disabled.
    • Player Did Not Finish = 1, Credits are enabled in this playlist, but TotalCreditsEarned is zero because the player did not finish the match.
    • Credits Earned = 2, Credits are enabled in this playlist and the player completed the match, so the credits formula was successfully evaluated. The fields below provide the client with the values used in the formula.
    note

    If we used one or more default values, we still return NormalResult. The fields below will confirm the actual values used.

  • SpartanRankModifier: number

    The scalar applied to the credits earned based on the player's Spartan Rank.

  • TimePlayedAmount: number

    The portion of credits earned due to the time the player played in the match.

  • TotalCreditsEarned: number

    The total number of credits the player earned from playing this match.

CurrentCsr

CurrentCsr: CsrState

The Competitive Skill Ranking (CSR) of the player after the match ended. If the player is still in measurement matches, this field is null.

DNF

DNF: boolean

Indicates whether the player was present in the match when it ended.

DestroyedEnemyVehicles

DestroyedEnemyVehicles: EnemyKill[]

List of enemy vehicles destroyed. Vehicles are available via the Metadata API.

note

this stat measures enemy vehicles, not any vehicle destruction.

EnemyKills

EnemyKills: EnemyKill[]

List of enemies killed, per enemy type. Enemies are available via the Metadata API.

FlexibleStats

FlexibleStats: object

The game base variant specific stats for this match. Flexible stats are available via the Metadata API.

Type declaration

  • ImpulseStatCounts: StatCount[]

    The set of flexible stats that are derived from impulse events.

  • ImpulseTimelapses: Timelapse[]

    The set of flexible stats that are derived from impulse time lapses.

  • MedalStatCounts: StatCount[]

    The set of flexible stats that are derived from medal events.

  • MedalTimelapses: Timelapse[]

    The set of flexible stats that are derived from medal time lapses.

Impulses

Impulses: ImpulseCount[]

The set of Impulses (invisible Medals) earned by the player.

KilledByOpponentDetails

KilledByOpponentDetails: OpponentDetails[]

The number of times the player was killed by each opponent. If the player was not killed by an opponent, there will be no entry for that opponent.

KilledOpponentDetails

KilledOpponentDetails: OpponentDetails[]

The number of times the player killed each opponent. If the player did not kill an opponent, there will be no entry for that opponent.

MeasurementMatchesLeft

MeasurementMatchesLeft: number

The player's measurement matches left. If this field is greater than zero, then the player will not have a CSR yet. If the player finished the match, this match is included in this count.

MedalAwards

MedalAwards: MedalAward[]

The set of Medals earned by the player.

MetaCommendationDeltas

MetaCommendationDeltas: MetaCommendationDelta[]

The player's progress towards meta commendations. Commendations that had no progress earned this match will not be returned.

Player

Player: object

Type declaration

  • Gamertag: string

    The player's gamertag.

PreviousCsr

PreviousCsr: CsrState

The Competitive Skill Ranking (CSR) of the player before the match started. If the player is still in measurement matches, this field is null. If the player finished the last measurement match this match, this field is still null.

ProgressiveCommendationDeltas

ProgressiveCommendationDeltas: ProgressiveCommendationDelta[]

The player's progress towards progressive commendations. Commendations that had no progress earned this match will not be returned.

Rank

Rank: number

The player's team-agnostic ranking.

RewardSets

RewardSets: RewardSet[]

The set of rewards that the player got in this match.

TeamId

TeamId: number

The ID of the team that the player was on when the match ended.

TotalAssassinations

TotalAssassinations: number

Total number of assassinations by the player.

TotalAssists

TotalAssists: number

Total number of assists by the player.

TotalDeaths

TotalDeaths: number

Total number of deaths by the player.

TotalGamesCompleted

TotalGamesCompleted: number

Not used.

TotalGamesLost

TotalGamesLost: number

Not used.

TotalGamesTied

TotalGamesTied: number

Not used.

TotalGamesWon

TotalGamesWon: number

Not used.

TotalGrenadeDamage

TotalGrenadeDamage: number

Total grenade damage dealt by the player.

TotalGrenadeKills

TotalGrenadeKills: number

Total number of grenade kills by the player.

TotalGroundPoundDamage

TotalGroundPoundDamage: number

Total ground pound damage dealt by the player.

TotalGroundPoundKills

TotalGroundPoundKills: number

Total number of ground pound kills by the player.

TotalHeadshots

TotalHeadshots: number

Total number of headshots done by the player.

TotalKills

TotalKills: number

Total number of kills done by the player. This includes melee kills, shoulder bash kills and Spartan charge kills, all power weapons, AI kills and vehicle destructions.

TotalMeleeDamage

TotalMeleeDamage: number

Total melee damage dealt by the player.

TotalMeleeKills

TotalMeleeKills: number

Total number of melee kills by the player.

TotalPowerWeaponDamage

TotalPowerWeaponDamage: number

Total power weapon damage dealt by the player.

TotalPowerWeaponGrabs

TotalPowerWeaponGrabs: number

Total number of power weapon grabs by the player.

TotalPowerWeaponKills

TotalPowerWeaponKills: number

Total number of power weapon kills by the player.

TotalPowerWeaponPossessionTime

TotalPowerWeaponPossessionTime: string

Total power weapon possession by the player. This is expressed as an ISO 8601 Duration.

TotalShotsFired

TotalShotsFired: number

Total number of shots fired by the player.

TotalShotsLanded

TotalShotsLanded: number

Total number of shots landed by the player.

TotalShoulderBashDamage

TotalShoulderBashDamage: number

Total shoulder bash damage dealt by the player.

TotalShoulderBashKills

TotalShoulderBashKills: number

Total number of shoulder bash kills by the player.

TotalSpartanKills

TotalSpartanKills: number

Total number of Spartan kills by the player.

TotalTimePlayed

TotalTimePlayed: string

Total timed played in this match by the player.

TotalWeaponDamage

TotalWeaponDamage: number

Total weapon damage dealt by the player.

WeaponStats

WeaponStats: WeaponStat[]

The set of weapons (weapons and vehicles included) used by the player.

WeaponWithMostKills

WeaponWithMostKills: object

The weapon the player used to get the most kills this match.

Type declaration

  • TotalDamageDealt: number

    The total damage dealt for this weapon.

  • TotalHeadshots: number

    The number of headshots for this weapon.

  • TotalKills: number

    The number of kills for this weapon.

  • TotalPossessionTime: string

    The total possession time for this weapon. This is expressed as an ISO 8601 Duration.

  • TotalShotsFired: number

    The number of shots fired for this weapon.

  • TotalShotsLanded: number

    The number of shots landed for this weapon.

  • WeaponId: object
    • Attachments: number[]

      Any attachments the weapon had.

    • StockId: number

      The ID of the weapon. Weapons are available via the Metadata API.

XpInfo

XpInfo: XpInfo

The experience information for the player in this match.

RewardSet

RewardSet:

CommendationLevelId

CommendationLevelId: guid

If the Reward Source is a Commendation, this is the ID of the level of the commendation that earned the reward.

CommendationSource

CommendationSource: guid

If the Reward Source is a Meta Commendation or Progress Commendation, this is the ID of the Meta Commendation or Progress Commendation, respectively, that earned the reward. Commendations are available via the Metadata API.

RewardSet

RewardSet: guid

The ID of the reward.

RewardSourceType

RewardSourceType: number

The source of the reward. Options are: None = 0, Meta Commendation = 1, Progress Commendation = 2, Spartan Rank = 3

SpartanRankSource

SpartanRankSource: number

If the Reward Source is Spartan Rank, this value is set to the Spartan Rank the player acquired that led to this reward being granted. Note: Unlike the commendations fields in this structure, this is not the GUID to a Spartan Rank content item. That's because the Spartan Rank content item itself does not detail what specific Spartan Rank it pertains to - this information is derived from the list of Spartan Ranks as a whole. Spartan Ranks are available via the Metadata API.

RoundStat

RoundStat:

Rank

Rank: number

The end rank for the team this round.

RoundNumber

RoundNumber: number

The round number this entry pertains to.

Score

Score: number

The end score for the team this round.

StatCount

StatCount:

Count

Count: number

The number of times this flexible stat was earned.

Id

Id: guid

The ID of the flexible stat.

TeamStat

TeamStat:

Rank

Rank: number

The team's rank at the end of the match.

RoundStats

RoundStats: RoundStat[]

The set of round stats for the team.

Score

Score: number

The team's score at the end of the match. The way the score is determined is based off the game base variant being played: Breakout = number of rounds won, CTF = number of flag captures, Slayer = number of kills, Strongholds = number of points, Warzone = number of points.

TeamId

TeamId: number

The ID for the team.

Timelapse

Timelapse:

Id

Id: guid

The ID of the flexible stat.

Timelapse

Timelapse: string

The amount of time the flexible stat was earned for. This is expressed as an ISO 8601 Duration.

WeaponStat

WeaponStat:

TotalDamageDealt

TotalDamageDealt: number

The total damage dealt for this weapon.

TotalHeadshots

TotalHeadshots: number

The number of headshots for this weapon.

TotalKills

TotalKills: number

The number of kills for this weapon.

TotalPossessionTime

TotalPossessionTime: string

Duration.

TotalShotsFired

TotalShotsFired: number

The number of shots fired for this weapon.

TotalShotsLanded

TotalShotsLanded: number

The number of shots landed for this weapon.

WeaponId

WeaponId: object

Type declaration

  • Attachments: number[]

    Any attachments the weapon had.

  • StockId: number

    The ID of the weapon. Weapons are available via the Metadata API.

XpInfo

XpInfo:

BoostAmount

BoostAmount: number

The amount of XP the player earned if they played a boost card for this match, and the boost card criteria was met. This is a fixed amount of XP, not a multiplier.

PerformanceXP

PerformanceXP: number

concluded.

PlayerRankXPAward

PlayerRankXPAward: number

The XP awarded to the player for their team-agnostic rank.

PlayerTimePerformanceXPAward

PlayerTimePerformanceXPAward: number

time was spent in-match.

PrevSpartanRank

PrevSpartanRank: number

The player's Spartan Rank before the match started.

PrevTotalXP

PrevTotalXP: number

The player's XP before the match started.

SpartanRank

SpartanRank: number

The player's Spartan Rank after the match ended.

SpartanRankMatchXPScalar

SpartanRankMatchXPScalar: number

the match ended.

TotalXP

TotalXP: number

The player's XP after the match ended.

"stats/PlayerMatches.d"

"stats/PlayerMatches.d":

Match

Match:

GameBaseVariantId

GameBaseVariantId: guid

The ID of the game base variant for this match. Game base variants are available via the Metadata API.

GameVariant

GameVariant: Resource

The variant of the game for this match. There are two sources of game variants: official game variants available via the Metadata API and user-generated game variants which are not available via the APIs currently. If the game variant for this match was an official game variant, then the structure will be as documented here. This will be null for campaign games.

HopperId

HopperId: guid

The ID of the playlist (aka Hopper) for the match. Hoppers are used in Arena and Warzone. In Arena, they function just as you would expect, similar to previous Halo titles. Warzone uses hoppers as well. There will be multiple Warzone hoppers which contain a rotating playlist of scenarios to play. Null for campaign & custom games. Playlists are available via the Metadata API.

Id

Links: links;

IsTeamGame

IsTeamGame: boolean

Whether this was a team-based game or not (e.g. free-for-all).

MapId

MapId: guid

The ID of the base map for this match. Maps are available via the Metadata API.

MapVariant

MapVariant: Resource

The variant of the map for this match. There are two sources of map variants: official map variants available via the Metadata API and user-generated map variants which are not available via the APIs currently. If the map variant for this match was an official map variant, then the structure will be as documented here. This will be null for campaign games.

MatchCompletedDate

MatchCompletedDate: object

The date and time when match ended. Note that this is different than the processing date, once matches end they typically take a small amount of time to process. The processing date is not available through this API. The time component of this date is always set to 00:00:00. This is expressed as an ISO 8601 combined Date and Time.

Type declaration

  • ISO8601Date: string

MatchDuration

MatchDuration: string

The length of the match. This is expressed as an ISO 8601 Duration.

Players

Players: MatchPlayer[]

This field contains the player's data. This will only contain data for the player specified in the request.

Teams

Teams: MatchTeam[]

Provides team data. This list contains all team that Won or Tied. Losing teams are not included. This list is empty for campaign games.

MatchId

MatchId:

GameMode

GameMode: number

The game mode applicable to this match. Options are:

  • Error = 0,
  • Arena = 1,
  • Campaign = 2,
  • Custom = 3, Warzone = 4.

MatchId

MatchId: guid

The ID for this match. More match details are available via the applicable Post Game Carnage Report endpoint.

MatchPlayer

MatchPlayer:

Player

Player: object

Type declaration

  • Gamertag: string

    The player's gamertag.

Rank

Rank: number

The player's team-agnostic ranking in this match.

Result

Result: number

Indicates what result the player received at the conclusion of the match. Options are:

  • Did Not Finish = 0, The player was not present when the match ended. Lost: The player was on a team that was assigned a loss, typically this is when a team does not have rank = 1.
  • Lost = 1,
  • Tied = 2, The player was on the team that was awarded a tie. Typically this is when the player is on the team with rank = 1, and there is at least one other team with rank = 1. Ties are only for rank = 1 teams. Consider the scenario when exactly one team is rank = 1, and two teams are rank = 2. Players on the rank=1 team will have Won; players on the rank = 2 teams will have Lost. For ties, this documentation states 'typically' because the game may have unique rules for multi-team and FFA scenarios, in which multiple teams are awarded a win.
  • Won = 3, The player was on the team that was assigned the win, typically this is the team that has rank = 1.

TeamId

TeamId: number

The ID of the team that the player was on when the match ended. Zero for campaign games.

TotalAssists

TotalAssists: number

The number of assists credited to the player during the match. This includes other Spartans and Enemy AI.

TotalDeaths

TotalDeaths: number

The number of times this player died during the match.

TotalKills

TotalKills: number

other Spartans and Enemy AI.

MatchTeam

MatchTeam:

Id

Id: number

are available via the Metadata API.

Rank

Rank: number

The team's rank at the end of the match.

Score

Score: number

The team's score at the end of the match. The way the score is determined is based off the game base variant being played: Breakout = number of rounds won, CTF = number of flag captures, Slayer = number of kills, Strongholds = number of points, Warzone = number of points.

PaginatedResponse

PaginatedResponse:

Count

Count: number

The number of results that the service attempted to retrieve to satisfy this request. Normally this value is equal to the count parameter. If the client specified a count parameter greater than the maximum allowed, this value contains the maximum allowed amount.

ResultCount

ResultCount: number

The number of results that are actually being returned in this response. This field is named ResultCount to avoid confusion with Count.

Results

Results: T[]

A list of recent matches. Matches are listed in chronological order with the most recently started match first.

Start

Start: number

The starting point that was used. When the start query string parameter is specified, this value is identical. When start is omitted, the default value is returned.

Resource

Resource:

Owner

Owner: string

The owner. Usually set to null.

OwnerType

OwnerType: number

The source of the map variant. Options are:

  • Unknown = 0
  • User-generated = 1 and 2,
  • Official = 3.

ResourceId

ResourceId: guid

The ID of the map variant. Game/Map variants are available via the Metadata API.

ResourceType

ResourceType: number

The resource type. 3 indicates map variant. 2 indicates game variant.

PlayerMatches

PlayerMatches: PaginatedResponse<Match>

"stats/index.d"

"stats/index.d":

IMatchesParams

IMatchesParams:

count

count: number

modes

modes: string

player

player: string

start

start: number

IStats

IStats:

arenaMatchById

campaignMatchById

  • campaignMatchById(id: guid): Promise<any>

customMatchById

  • customMatchById(id: guid): Promise<any>

events

playerMatches

serviceRecordArena

  • serviceRecordArena(player: string): Promise<any>

serviceRecordCampaign

  • serviceRecordCampaign(player: string): Promise<any>

serviceRecordCustom

  • serviceRecordCustom(player: string): Promise<any>

serviceRecordWarzone

  • serviceRecordWarzone(player: string): Promise<any>

serviceRecordsArena

  • serviceRecordsArena(players: string[]): Promise<any>

serviceRecordsCampaign

  • serviceRecordsCampaign(players: string[]): Promise<any>

serviceRecordsCustom

  • serviceRecordsCustom(players: string[]): Promise<any>

serviceRecordsWarzone

  • serviceRecordsWarzone(players: string[]): Promise<any>

warzoneMatchById

  • warzoneMatchById(id: guid): Promise<any>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc