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

# POST /titles/{titleId}/recentplayers/server

> Post Server Recent Players

# Post Server Recent Players

複数のユーザーの最近のプレイヤー リストに追加または更新します (一方向)。これは基本的に、サーバー向けのクライアント API のバッチ API です。

この API を使用すると、ゲーム サーバーは複数のユーザーの最近のプレイヤー リストに追加し、既存の最近のプレイヤー エントリを更新できます。各ユーザーの最近のプレイヤー リストは一方向です。

```http theme={null}
POST /titles/{titleId}/recentplayers/server
```

## URI パラメーター

| パラメーター | 場所 | 必須 | 種類 | 説明 |
| - | - | - | - | - |
| titleId | path | TRUE | integer | リクエストが送信されているゲームの titleId。 |

## リクエスト ヘッダー

| 名前 | 必須 | 種類 | 説明 |
| - | - | - | - |
| Authorization | TRUE | integer | 呼び出し元は XBL 3.0 承認形式で XToken を指定する必要があります。例: Authorization: XBL3.0 x=2553948354698;>encrypted token\<) |
| Content-Type | TRUE | string | ContentType は application/json に設定する必要があります |

## リクエスト本文

| 名前 | 必須 | 種類 | 説明 |
| - | - | - | - |
| recentPlayersByXuid | TRUE | [ServerRecentPlayersByXuid](#serverrecentplayersbyxuid)\[] | XUID とその最近のプレイヤーを表すオブジェクトの配列。少なくとも 1 つ、最大 20 の XUID エントリを指定する必要があります。 |

## 応答

| 名前 | 種類 | 説明 |
| - | - | - |
| 204 No Content | | 最近のプレイヤー リクエストが正常に送信されました。 |
| 400 Bad Request | [ErrorResponse](#errorresponse) | リクエスト処理中にエラーが発生しました。可能なエラー コード: "RequestValidationError: The request validation has failed.", " AuthorizationError: The caller is not allowed to access the resource." |
| その他のステータス コード | [ThrottledEntity](#throttledentity) | リクエストが多すぎます。ヘッダー Retry-After: integer |

## 定義

* [EncounterType](#encountertype)
* [ErrorResponse](#errorresponse)
* [Network](#network)
* [ServerRecentPlayersByXuid](#serverrecentplayersbyxuid)
* [ServerRecentPlayersRequest](#serverrecentplayersrequest)
* [ThrottledEntity](#throttledentity)
* [UnidirectionalRecentPlayer](#unidirectionalrecentplayer)

### EncounterType

最近のプレイヤーとの遭遇の種類。このフィールドは省略可能で、既定値は Default です。Default には所定の意味はありません。呼び出し元がこの値を適切に解釈する必要があります。

| 名前 | 種類 | 説明 |
| - | - | - |
| Default | string | |
| Opponent | string | |
| Teammate | string | |

### ErrorResponse

| 名前 | 種類 | 説明 |
| - | - | - |
| debugMessage | string | デバッグに使用できる、人間が読めるエラー メッセージのバージョン。 |
| errorCode | string | エラー コード列挙型。 |

### Network

| 名前 | 種類 | 説明 |
| - | - | - |
| XboxLive | string | |

### ServerRecentPlayersByXuid

| 名前 | 種類 | 説明 |
| - | - | - |
| recentPlayers | [UnidirectionalRecentPlayer](#unidirectionalrecentplayer)\[] | このユーザーの最近のプレイヤーの配列。少なくとも 1 人の最近のプレイヤー、最大 100 人を指定する必要があります。 |
| xuid | string | ユーザーの XUID (基数 10 の整数)。 |

### ServerRecentPlayersRequest

| 名前 | 種類 | 説明 |
| - | - | - |
| recentPlayersByXuid | [ServerRecentPlayersByXuid](#serverrecentplayersbyxuid)\[] | XUID とその最近のプレイヤーを表すオブジェクトの配列。少なくとも 1 つ、最大 20 の XUID エントリを指定する必要があります。 |

### ThrottledEntity

| 名前 | 種類 | 説明 |
| - | - | - |
| currentRequests | string | 現在のリクエスト数 - 同時実行またはレート。 |
| debugMessage | string | デバッグに使用できる、人間が読めるスロットル メッセージのバージョン。 |
| limitType | string | 制限の種類 (同時実行またはレート)。 |
| maxRequests | string | 許容される最大リクエスト数 - 同時実行またはレート。 |
| periodInSeconds | string | レートまたは同時実行の制限を超えたときに適用される期間 (秒単位)。 |
| version | string | 現在のスロットル コントラクトのバージョン。 |

## UnidirectionalRecentPlayer

| 名前 | 種類 | 説明 |
| - | - | - |
| encounterType | [EncounterType](#encountertype) | 最近のプレイヤーとの遭遇の種類。このフィールドは省略可能で、既定値は Default です。Default には所定の意味はありません。呼び出し元がこの値を適切に解釈する必要があります。 |
| id | string | 別のユーザーの Id (基数 10 の整数の XUID)。 |
| network | [Network](#network) | 相手ユーザーと会ったネットワーク。 |
| timestamp | string | |


## Related topics

- [POST /titles/{titleId}/recentplayergroups/server](https://devdocs.xbox.com/ja-jp/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-PostServerRecentPlayerGroup.md)
- [POST /titles/{titleId}/recentplayers](https://devdocs.xbox.com/ja-jp/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-PostUniRecentPlayers.md)
- [POST /titles/{titleId}/invites/server API](https://devdocs.xbox.com/ja-jp/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-SendServerInvite.md)
- [POST /titles/{titleId}/invites](https://devdocs.xbox.com/ja-jp/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-SendInvite.md)
- [POST /titles/{titleId}/activities/query](https://devdocs.xbox.com/ja-jp/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-ExternalGetActivityBatch.md)
