swagger: "2.0"
schemes:
  - https
host: www.haloapi.com
basePath: /ugc
info:
  contact:
    x-twitter: halo
  description: API that provides Metadata about User-Generated Content (Maps and Game Variants).
  title: UGC
  version: "1.0"
  x-apisguru-categories:
    - entertainment
  x-logo:
    url: https://upload.wikimedia.org/wikipedia/commons/d/d7/Halo_%28series%29_logo.svg
  x-origin:
    - format: swagger
      url: https://developer.haloapi.com/docs/services/58acde2921091812784ce8c3/export?DocumentFormat=Swagger
      version: "2.0"
    - format: swagger
      url: https://developer.haloapi.com/docs/services/58acde2921091812784ce8c3/export?DocumentFormat=Swagger
      version: "2.0"
  x-providerName: haloapi.com
  x-serviceName: ugc
securityDefinitions:
  apiKeyHeader:
    in: header
    name: Ocp-Apim-Subscription-Key
    type: apiKey
  apiKeyQuery:
    in: query
    name: subscription-key
    type: apiKey
security:
  - apiKeyHeader: []
  - apiKeyQuery: []
tags: []
paths:
  "/h5/players/{player}/gamevariants":
    get:
      description: |
        <p>Retrieves a list of Game Variants created by a Player.</p>
        <br />
        <h4>Changelog</h4>
        <div class="panel-body">
            <p><strong>February 21, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "List Game Variants" to "Halo 5 - Player Game Variants".</li>
                <li>Removed "{title}" Request Parameter.</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>August 5, 2016:</strong></p>
            <ul>
                <li>Added Endpoint.</li>
            </ul>
        </div>
      operationId: 58acde292109180bdcacc40d
      parameters:
        - description: The Gamertag of the Player that owns the listed Game Variants.
          in: path
          name: player
          required: true
          type: string
        - description: When specified, this indicates the starting index (0-based) for which the list of results will begin at.
          in: query
          name: start
          type: number
        - description: When specified, this indicates the maximum quantity of items the caller would like returned in the response.
          in: query
          name: count
          type: number
        - description: 'When specified, this indicates what field should be used to sort the results as the primary sort order. When omitted, "modified" (descending) is the assumed primary sort order. Allowed sort fields are: name, description, accessibility, created, modified, bookmarkCount.'
          in: query
          name: sort
          type: number
        - description: 'When specified, this indicates the ordering that will be applied. When omitted, "desc" is assumed. Allowed order values are: asc, desc.'
          in: query
          name: order
          type: number
      produces:
        - application/json
      responses:
        "200":
          description: The response body will contain a list of the Player-created Game Variants.
          examples:
            application/json: |
              {
                // A list of game variants owned by the requested player.
                "Results": [
                  {
                    // Internal use only. This will always be 1.
                    "BaseGameEngineType": "int",

                    // Internal use only. This will always be 1.
                    "GameType": "int",

                    // The base game variant on which this variant is created.
                    "BaseGame": {

                      // The resource type. 8 indicates base game variant.
                      "ResourceType": 8,

                      // The ID of the base game variant.
                      "ResourceId": "guid",

                      // The source of the base game variant. will always be 3 (Official) for the
                      // BaseGame.
                      "OwnerType": "int",

                      // The gamertag of the user that created the base game variant if this is a
                      // user-generated game variant, or null otherwise.
                      "Owner": "string"
                    },

                    // The minimum score necessary for a player to win the match. A value of 0
                    // indicates the base game variant's default value is used.
                    "ScoreToWin": "int",

                    // The number of lives allowed. A value of 0 indicates the base game variant's
                    // default value is used.
                    "NumberOfLives": "int",

                    // Maximum runtime of the match in seconds. A value of 0 indicates the base game
                    // variant's default value is used.
                    "MatchDurationInSeconds": "int",

                    // The number of rounds in the match. A value of 0 indicates the base game
                    // variant's default value is used.
                    "NumberOfRounds": "int",

                    // The name of the game variant.
                    "Name": "sring",

                    // The description of the game variant.
                    "Description": "string",

                    // Indicates the restrictions for access that apply to the game variant. possible
                    // values are:
                    //   Listed (game variant will show up in search results) = 0,
                    //   Unlisted (game variant won't show up in search results) = 1,
                    //   Unknown = 2.
                    "AccessControl": "int",

                    // Internal use only.
                    "Links": "links",

                    // The date that the game variant was created. The time component of this date is
                    // always set to "00:00:00". This is expressed as an ISO 8601 combined Date and
                    // Time.
                    "CreationTimeUtc": {

                      "ISO8601Date": "string"
                    },

                    // The date that the game variant was last modified. The time component of this
                    // date is always set to "00:00:00". This is expressed as an ISO 8601 combined Date
                    // and Time.
                    "LastModifiedTimeUtc": {

                      "ISO8601Date": "string"
                    },

                    // A flag indicating whether this file has been banned or not.
                    "Banned": "boolean",

                    // The identity of the game variant.
                    "Identity": {

                      // The resource type. 2 inidicates game variant.
                      "ResourceType": 2,

                      // The ID of the game varaint.
                      "ResourceId": "guid",

                      // The source of the game variant. will always be 1 (user generated).
                      "OwnerType": 1,

                      // The gamertag of the user that created the game variant.
                      "Owner": "string"
                    },

                    // The set of aggregate statistics associated with this game variant.
                    "Stats": {

                      // The current number of active bookmarks on this game variant.
                      "BookmarkCount": "int",

                      // Internal use only. This will always be false.
                      "HasCallerBookmarked": false
                    }
                  }
                ],

                // 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.
                "Start": "int",

                // 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.
                "Count": "int",

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

                // Total number of items of the requested type.
                "TotalCount": "int",

                // Internal use only.
                "Links": "links"
              }
        "400":
          description: Specified Gamertag is malformed.
        "404":
          description: The player does not exist.
        "500":
          description: Internal Server Error
      summary: Halo 5 - Player Game Variants
  "/h5/players/{player}/gamevariants/{variant}":
    get:
      description: |
        <p>Retrieves Metadata about a Player-created Game Variant.</p>
        <br />
        <h4>Changelog</h4>
        <div class="panel-body">
            <p><strong>February 21, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "Get Game Variant" to "Halo 5 - Player Game Variant".</li>
                <li>Removed "{title}" Request Parameter.</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>August 5, 2016:</strong></p>
            <ul>
                <li>Added Endpoint.</li>
            </ul>
        </div>
      operationId: 58acde292109180bdcacc40c
      parameters:
        - description: The Gamertag of the Player that owns the Game Variant.
          in: path
          name: player
          required: true
          type: string
        - description: The ID for the Game Variant.
          in: path
          name: variant
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: The response body will contain the Metadata for the Player-created Game Variant.
          examples:
            application/json: |
              {
                // Internal use only. This will always be 1.
                "BaseGameEngineType": "int",

                // Internal use only. This will always be 1.
                "GameType": "int",

                // The base game variant on which this variant is created.
                "BaseGame": {

                  // The resource type. 8 indicates base game variant.
                  "ResourceType": 8,

                  // The ID of the base game variant.
                  "ResourceId": "guid",

                  // The source of the base game variant. will always be 3 (Official) for the BaseGame.
                  "OwnerType": "int",

                  // The gamertag of the user that created the base game variant if this is a
                  // user-generated game variant, or null otherwise.
                  "Owner": "string"
                },

                // The minimum score necessary for a player to win the match. A value of 0 indicates
                // the base game variant's default value is used.
                "ScoreToWin": "int",

                // The number of lives allowed. A value of 0 indicates the base game variant's default
                // value is used.
                "NumberOfLives": "int",

                // Maximum runtime of the match in seconds. A value of 0 indicates the base game
                // variant's default value is used.
                "MatchDurationInSeconds": "int",

                // The number of rounds in the match. A value of 0 indicates the base game variant's
                // default value is used.
                "NumberOfRounds": "int",

                // The name of the game variant.
                "Name": "sring",

                // The description of the game variant.
                "Description": "string",

                // Indicates the restrictions for access that apply to the game variant. possible
                // values are:
                //   Listed (game variant will show up in search results) = 0,
                //   Unlisted (game variant won't show up in search results) = 1,
                //   Unknown = 2.
                "AccessControl": "int",

                // Internal use only.
                "Links": "links",

                // The date that the game variant was created. The time component of this date is
                // always set to "00:00:00". This is expressed as an ISO 8601 combined Date and Time.
                "CreationTimeUtc": {

                  "ISO8601Date": "string"
                },

                // The date that the game variant was last modified. The time component of this date is
                // always set to "00:00:00". This is expressed as an ISO 8601 combined Date and Time.
                "LastModifiedTimeUtc": {

                  "ISO8601Date": "string"
                },

                // A flag indicating whether this file has been banned or not.
                "Banned": "boolean",

                // The identity of the game variant.
                "Identity": {

                  // The resource type. 2 inidicates game variant.
                  "ResourceType": 2,

                  // The ID of the game varaint.
                  "ResourceId": "guid",

                  // The source of the game variant. will always be 1 (user generated).
                  "OwnerType": 1,

                  // The gamertag of the user that created the game variant.
                  "Owner": "string"
                },

                // The set of aggregate statistics associated with this game variant.
                "Stats": {

                  // The current number of active bookmarks on this game variant.
                  "BookmarkCount": "int",

                  // Internal use only. This will always be false.
                  "HasCallerBookmarked": false
                }
              }
        "400":
          description: Specified Gamertag is malformed or the Game Variant ID is malformed.
        "404":
          description: The player does not exist or the Game Variant does not exist in the provided Player's file share.
        "500":
          description: Internal Server Error
      summary: Halo 5 - Player Game Variant
  "/h5/players/{player}/mapvariants":
    get:
      description: |
        <p>Retrieves a list Map Variants created by a Player.</p>
        <br />
        <h4>Changelog</h4>
        <div class="panel-body">
            <p><strong>February 21, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "List Map Variants" to "Halo 5 - Player Map Variants".</li>
                <li>Removed "{title}" Request Parameter.</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>August 5, 2016:</strong></p>
            <ul>
                <li>Added Endpoint.</li>
            </ul>
        </div>
      operationId: 58acde292109180bdcacc40f
      parameters:
        - description: The Gamertag of the Player that owns the listed Map Variants.
          in: path
          name: player
          required: true
          type: string
        - description: When specified, this indicates the starting index (0-based) for which the list of results will begin at.
          in: query
          name: start
          type: number
        - description: When specified, this indicates the maximum quantity of items the caller would like returned in the response.
          in: query
          name: count
          type: number
        - description: 'When specified, this indicates what field should be used to sort the results as the primary sort order. When omitted, "modified" (descending) is the assumed primary sort order. Allowed sort fields are: name, description, accessibility, created, modified, bookmarkCount.'
          in: query
          name: sort
          type: number
        - description: 'When specified, this indicates the ordering that will be applied. When omitted, "desc" is assumed. Allowed order values are: asc, desc.'
          in: query
          name: order
          type: number
      produces:
        - application/json
      responses:
        "200":
          description: The response body will contain a list of the Player-created Map Variants.
          examples:
            application/json: |
              {
                // A list of map variants owned by the requested player.
                "Results": [
                  {
                    // The base map on which this variant is created from.
                    "BaseMap": {

                      // The resource type. 9 indicates base map.
                      "ResourceType": 9,

                      // The ID of the base map.
                      "ResourceId": "guid",

                      // The source of the base map variant. will always be 3 (Official) for the BasMap.
                      "OwnerType": "int",

                      // The gamertag of the user that created the base game variant if this is a
                      // user-generated game variant, or null otherwise.
                      "Owner": "string"
                    },

                    // The name of the map variant.
                    "Name": "string",

                    // The description of the map variant.
                    "Description": "string",

                    // Indicates the restrictions for access that apply to the game variant. possible
                    // values are:
                    //   Listed (game variant will show up in search results) = 0,
                    //   Unlisted (game variant won't show up in search results) = 1,
                    //   Unknown = 2.
                    "AccessControl": "int",

                    // Internal use only.
                    "Links": "links",

                    // The date that the map variant was created. The time component of this date is
                    // always set to "00:00:00". This is expressed as an ISO 8601 combined Date and
                    // Time.
                    "CreationTimeUtc": {

                      "ISO8601Date": "string"
                    },

                    // The date that the map variant was last modified. The time component of this date
                    // is always set to "00:00:00". This is expressed as an ISO 8601 combined Date and
                    // Time.
                    "LastModifiedTimeUtc": {

                      "ISO8601Date": "string"
                    },

                    // A flag indicating whether this file has been banned or not.
                    "Banned": "boolean",

                    // The identity of the map variant.
                    "Identity": {

                      // The resource type. 3 inidicates map variant.
                      "ResourceType": 3,

                      // The ID of the map varaint.
                      "ResourceId": "guid",

                      // The source of the map variant. will always be 1 (user generated).
                      "OwnerType": 1,

                      // The gamertag of the user that created the game variant.
                      "Owner": "string"
                    },

                    // The set of aggregate statistics associated with this map variant.
                    "Stats": {

                      // The current number of active bookmarks on this map variant.
                      "BookmarkCount": "int",

                      // Internal use only. This will always be false.
                      "HasCallerBookmarked": false
                    }
                  }
                ],

                // 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.
                "Start": "int",

                // 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.
                "Count": "int",

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

                // Total number of items of the requested type.
                "TotalCount": "int",

                // Internal use only.
                "Links": "links"
              }
        "400":
          description: Specified Gamertag is malformed.
        "404":
          description: The Player does not exist.
        "500":
          description: Internal Server Error
      summary: Halo 5 - Player Map Variants
  "/h5/players/{player}/mapvariants/{variant}":
    get:
      description: |
        <p>Retrieves Metadata about a Player-created Map Variant.</p>
        <br />
        <h4>Changelog</h4>
        <div class="panel-body">
            <p><strong>February 21, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "Get Map Variant" to "Halo 5 - Player Map Variant".</li>
                <li>Removed "{title}" Request Parameter.</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>August 5, 2016:</strong></p>
            <ul>
                <li>Added Endpoint.</li>
            </ul>
        </div>
      operationId: 58acde292109180bdcacc40e
      parameters:
        - description: The Gamertag of the Player that owns the Map Variant.
          in: path
          name: player
          required: true
          type: string
        - description: The ID for the Map Variant.
          in: path
          name: variant
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: The response body will contain the Metadata for the Player-created Map Variant.
          examples:
            application/json: |
              {
                // A list of map variants owned by the requested player.
                "Results": [
                  {
                    // The base map on which this variant is created from.
                    "BaseMap": {

                      // The resource type. 9 indicates base map.
                      "ResourceType": 9,

                      // The ID of the base map.
                      "ResourceId": "guid",

                      // The source of the base map variant. will always be 3 (Official) for the BasMap.
                      "OwnerType": "int",

                      // The gamertag of the user that created the base game variant if this is a
                      // user-generated game variant, or null otherwise.
                      "Owner": "string"
                    },

                    // The name of the map variant.
                    "Name": "string",

                    // The description of the map variant.
                    "Description": "string",

                    // Indicates the restrictions for access that apply to the game variant. possible
                    // values are:
                    //   Listed (game variant will show up in search results) = 0,
                    //   Unlisted (game variant won't show up in search results) = 1,
                    //   Unknown = 2.
                    "AccessControl": "int",

                    // Internal use only.
                    "Links": "links",

                    // The date that the map variant was created. The time component of this date is
                    // always set to "00:00:00". This is expressed as an ISO 8601 combined Date and
                    // Time.
                    "CreationTimeUtc": {

                      "ISO8601Date": "string"
                    },

                    // The date that the map variant was last modified. The time component of this date
                    // is always set to "00:00:00". This is expressed as an ISO 8601 combined Date and
                    // Time.
                    "LastModifiedTimeUtc": {

                      "ISO8601Date": "string"
                    },

                    // A flag indicating whether this file has been banned or not.
                    "Banned": "boolean",

                    // The identity of the map variant.
                    "Identity": {

                      // The resource type. 3 inidicates map variant.
                      "ResourceType": 3,

                      // The ID of the map varaint.
                      "ResourceId": "guid",

                      // The source of the map variant. will always be 1 (user generated).
                      "OwnerType": 1,

                      // The gamertag of the user that created the game variant.
                      "Owner": "string"
                    },

                    // The set of aggregate statistics associated with this map variant.
                    "Stats": {

                      // The current number of active bookmarks on this map variant.
                      "BookmarkCount": "int",

                      // Internal use only. This will always be false.
                      "HasCallerBookmarked": false
                    }
                  }
                ],

                // 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.
                "Start": "int",

                // 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.
                "Count": "int",

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

                // Total number of items of the requested type.
                "TotalCount": "int",

                // Internal use only.
                "Links": "links"
              }
        "400":
          description: Specified Gamertag is malformed or the Map Variant ID is malformed.
        "404":
          description: The Player does not exist or the Map Variant does not exist in the provided Player's file share.
        "500":
          description: Internal Server Error
      summary: Halo 5 - Player Map Variant
