POST v1/game-plays/start-game-play

Request a Game Play

Request Information

URI Parameters

None.

Body Parameters

Includes: GameId = What Game the Game Play is Requested ParticipantId = Who is Taking the Game IsPreview = Whether this is a Preview. Test Previews are not record.

GamePlayRequest
NameDescriptionTypeAdditional information
TokenId

string

None.

GameId

string

None.

ParticipantId

string

None.

ParticipantMetadata

Dictionary of string [key] and string [value]

None.

IsPreview

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "TokenId": "sample string 1",
  "GameId": "sample string 2",
  "ParticipantId": "sample string 3",
  "ParticipantMetadata": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "IsPreview": true
}

text/html

Sample:
{"TokenId":"sample string 1","GameId":"sample string 2","ParticipantId":"sample string 3","ParticipantMetadata":{"sample string 1":"sample string 2","sample string 3":"sample string 4"},"IsPreview":true}

application/xml, text/xml

Sample:
<GamePlayRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ITAGroup.Games.Api.Contracts.v1.Models">
  <GameId>sample string 2</GameId>
  <IsPreview>true</IsPreview>
  <ParticipantId>sample string 3</ParticipantId>
  <ParticipantMetadata xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </ParticipantMetadata>
  <TokenId>sample string 1</TokenId>
</GamePlayRequest>

Response Information

Resource Description

An object with the Game Play Key. The Game Play Key is used to Play the Game.

StartGamePlayPostResponse
NameDescriptionTypeAdditional information
GamePlayKey

globally unique identifier

None.

GameName

string

None.

Reason

string

None.

AwardValue

integer

None.

IsPreview

boolean

None.

GamePlayUrl

string

None.

Response Codes

  • 200 OK: A Game Play of a Game successfully requested and started.
  • 400 BadRequest: Data validation failed, see the response body for more information.
  • 401 Unauthorized:
  • 500 InternalServerError:

Response Formats

application/json, text/json

Sample:
{
  "GamePlayKey": "93dfc341-5a19-4e75-bfde-3a2adac7f895",
  "GameName": "sample string 2",
  "Reason": "sample string 3",
  "AwardValue": 4,
  "IsPreview": true,
  "GamePlayUrl": "sample string 6"
}

text/html

Sample:
{"GamePlayKey":"93dfc341-5a19-4e75-bfde-3a2adac7f895","GameName":"sample string 2","Reason":"sample string 3","AwardValue":4,"IsPreview":true,"GamePlayUrl":"sample string 6"}

application/xml, text/xml

Sample:
<StartGamePlayPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ITAGroup.Games.Api.Contracts.v1.Responses">
  <AwardValue>4</AwardValue>
  <GameName>sample string 2</GameName>
  <GamePlayKey>93dfc341-5a19-4e75-bfde-3a2adac7f895</GamePlayKey>
  <GamePlayUrl>sample string 6</GamePlayUrl>
  <IsPreview>true</IsPreview>
  <Reason>sample string 3</Reason>
</StartGamePlayPostResponse>