Rooms: reportStatus

Updates sent by a client reporting the status of peers in a room. For internal use by the Games SDK only. Calling this method directly is unsupported. Try it now.

Request

HTTP request

POST https://www.googleapis.com/games/v1/rooms/roomId/reportstatus

Parameters

Parameter name Value Description
Path parameters
roomId string The ID of the room.
Optional query parameters
language string The preferred language to use for strings returned by this method.

Authorization

This request requires authorization with the following scope:

Scope
https://www.googleapis.com/auth/games

For more information, see the authentication and authorization page.

Request body

In the request body, supply data with the following structure:

{
  "kind": "games#roomP2PStatuses",
  "updates": [
    {
      "kind": "games#roomP2PStatus",
      "participantId": string,
      "status": string,
      "connectionSetupLatencyMillis": integer,
      "unreliableRoundtripLatencyMillis": integer,
      "error": string,
      "error_reason": string
    }
  ]
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#roomP2PStatuses.
updates[] list The updates for the peers.
updates[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#roomP2PStatus.
updates[].participantId string The ID of the participant.
updates[].status string The status of the peer in the room.
Possible values are:
  • "CONNECTION_ESTABLISHED" - The client established a P2P connection with the peer.
  • "CONNECTION_FAILED" - The client failed to establish directed presence with the peer.


Acceptable values are:
  • "CONNECTION_ESTABLISHED"
  • "CONNECTION_FAILED"
updates[].connectionSetupLatencyMillis integer The amount of time in milliseconds it took to establish connections with this peer.
updates[].unreliableRoundtripLatencyMillis integer The amount of time in milliseconds it took to send packets back and forth on the unreliable channel with this peer.
updates[].error string The error code in event of a failure.
Possible values are:
  • "P2P_FAILED" - The client failed to establish a P2P connection with the peer.
  • "PRESENCE_FAILED" - The client failed to register to receive P2P connections.
  • "RELAY_SERVER_FAILED" - The client received an error when trying to use the relay server to establish a P2P connection with the peer.


Acceptable values are:
  • "P2P_FAILED"
  • "PRESENCE_FAILED"
  • "RELAY_SERVER_FAILED"
updates[].error_reason string More detailed diagnostic message returned in event of a failure.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "games#roomStatus",
  "roomId": string,
  "status": string,
  "participants": [
    {
      "kind": "games#roomParticipant",
      "id": string,
      "player": players Resource,
      "autoMatchedPlayer": {
        "kind": "games#anonymousPlayer",
        "displayName": string,
        "avatarImageUrl": string
      },
      "autoMatched": boolean,
      "status": string,
      "clientAddress": {
        "kind": "games#roomClientAddress",
        "xmppAddress": string
      },
      "connected": boolean,
      "leaveReason": string,
      "capabilities": [
        string
      ]
    }
  ],
  "statusVersion": integer,
  "autoMatchingStatus": {
    "kind": "games#roomAutoMatchStatus",
    "waitEstimateSeconds": integer
  }
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#roomStatus.
roomId string Globally unique ID for a room.
status string The status of the room.
Possible values are:
  • "ROOM_INVITING" - One or more players have been invited and not responded.
  • "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
  • "ROOM_CONNECTING" - Players have joined are connecting to each other (either before or after auto-matching).
  • "ROOM_ACTIVE" - All players have joined and connected to each other.
  • "ROOM_DELETED" - All joined players have left.


Acceptable values are:
  • "ROOM_ACTIVE"
  • "ROOM_AUTO_MATCHING"
  • "ROOM_CONNECTING"
  • "ROOM_DELETED"
  • "ROOM_INVITING"
participants[] list The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
participants[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
participants[].id string An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
participants[].player nested object Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
participants[].autoMatchedPlayer nested object Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
participants[].autoMatchedPlayer.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
participants[].autoMatchedPlayer.displayName string The name to display for the anonymous player.
participants[].autoMatchedPlayer.avatarImageUrl string The base URL for the image to display for the anonymous player.
participants[].autoMatched boolean True if this participant was auto-matched with the requesting player.
participants[].status string The status of the participant with respect to the room.
Possible values are:
  • "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
  • "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
  • "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
  • "PARTICIPANT_LEFT" - The participant joined the room and then left it.


Acceptable values are:
  • "PARTICIPANT_DECLINED"
  • "PARTICIPANT_INVITED"
  • "PARTICIPANT_JOINED"
  • "PARTICIPANT_LEFT"
participants[].clientAddress nested object Client address for the participant.
participants[].clientAddress.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
participants[].clientAddress.xmppAddress string The XMPP address of the client on the Google Games XMPP network.
participants[].connected boolean True if this participant is in the fully connected set of peers in the room.
participants[].leaveReason string The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
Possible values are:
  • "PLAYER_LEFT" - The player explicitly chose to leave the room.
  • "GAME_LEFT" - The game chose to remove the player from the room.
  • "ABANDONED" - The player switched to another application and abandoned the room.
  • "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
  • "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
  • "TIMEOUT" - The client timed out while waiting for players to join and connect.
  • "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.


Acceptable values are:
  • "ABANDONED"
  • "GAME_LEFT"
  • "PEER_CONNECTION_FAILURE"
  • "PLAYER_LEFT"
  • "PRESENCE_FAILURE"
  • "SERVER_CONNECTION_FAILURE"
  • "SERVER_ERROR"
  • "TIMEOUT"
participants[].capabilities[] list The capabilities which can be used when communicating with this participant.
statusVersion integer The version of the status for the room: an increasing counter, used by the client to ignore out-of-order updates to room status.
autoMatchingStatus nested object Auto-matching status for this room. Not set if the room is not currently in the automatching queue.
autoMatchingStatus.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
autoMatchingStatus.waitEstimateSeconds integer An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.